How to use multiple versions of Python without uninstallation

前端 未结 15 1572
醉梦人生
醉梦人生 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:11

    I do use at least 3 or 4 versions of Python on my machines (Windows). The installers from http://python.org/ automatically placed them in:

    c:\Python26
    c:\Python27
    c:\Python32
    

    and

    c:\Python24
    

    on one machine. I mostly use Python 2.7 because some applications use wxPython and also for the older console code. This python.exe was not renamed. By the way, the Python 2.7 also supports collections.Counter.

    The c:\Python26 and c:\Python24 are not included in my PATH. In c:\Python32\, the exe was renamed to py.exe. This way, python some.py starts Python 2.7, and py another.py starts Python 3.2.

提交回复
热议问题