当前位置: 代码迷 >> 综合 >> fedora13 python2.6升级到python2.7
  详细解决方案

fedora13 python2.6升级到python2.7

热度:23   发布时间:2023-12-07 20:46:20.0
  1. 从官网下载2.7.9版本
    # wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
  2. 安装
    # tar -xzvf Python-2.7.10.tgz
    # cd Python-2.7.10
    # ./configure   (如不指定 --prefix,默认安装在/usr/local/lib/python2.7)
    # make 
    # make install
  3. 升级默认版本
    #cd /usr/bin/
    # mv python /usr/bin/python26

    # ln -s /usr/local/bin/python2.7 /usr/bin/python

  4. 验证[Ray@Ray ~]$ python
    Python 2.7.10 (default, Jul 29 2015, 20:27:05)
    [GCC 4.4.4 20100503 (Red Hat 4.4.4-2)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>>