iojsioi 发表于 2018-8-15 13:39:02

源码安装python2.7

  # tar -zxf Python-2.7.11.tgz
  # cd Python-2.7.11
  # ./configure && make && make install
  # /usr/local/bin/python
  Python 2.7.11 (default, Jan2 2017, 12:16:39)
   on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> exit()
  # python
  Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22)
   on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>>
  >>> exit()
  #
  # cd ..
  # cp /usr/bin/python /usr/bin/python.bak.20170102
  #
  # rm /usr/bin/python
  rm: remove regular file `/usr/bin/python'? y
  #
  # ln -s /usr/local/bin/python
  python            python2.7         python2-config
  python2         python2.7-configpython-config
  # ln -s /usr/local/bin/python2.7 /usr/bin/python
  #
  # python
  Python 2.7.11 (default, Jan2 2017, 12:16:39)
   on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>>
  >>> exit()
页: [1]
查看完整版本: 源码安装python2.7