How to use multiple versions of Python without uninstallation

前端 未结 15 1548
醉梦人生
醉梦人生 2021-02-05 14:11

I am faced with a unique situation, slightly trivial but painful.

I need to use Python 2.6.6 because NLTK is not ported to Python 3 (that\'s what I could gather).

15条回答
  •  借酒劲吻你
    2021-02-05 15:00

    Use Pythonbrew, its super easy to install, and allows you to very easily install, and switch between, or temporarily use different python versions safely.

    Once pythonbrew is installed:

    #to install new python versions is as simple as:
    pythonbrew install 2.7.2 3.2
    #to use a particular version in the current shell:
    pythonbrew use 3.2
    #to uninstall:
    pythonbrew uninstall 2.7.2
    

提交回复
热议问题