Upgrade python without breaking yum

后端 未结 10 1286
耶瑟儿~
耶瑟儿~ 2020-11-29 17:28

I recently installed Python 2.7.3 on a CentOS machine by compiling from source. Python 2.7.3 is installed at /opt/python2.7 and when I installed it I just changed /usr/bin/p

10条回答
  •  野性不改
    2020-11-29 18:19

    pythonz, an active fork of pythonbrew, makes this a breeze. You can install a version with:

    # pythonz install 2.7.3
    

    Then set up a symlink with:

    # ln -s /usr/local/pythonz/pythons/CPython-2.7.3/bin/python2.7 /usr/local/bin/python2.7
    # python2.7 --version
    Python 2.7.3
    

提交回复
热议问题