Change default Python interpreter on Windows XP

后端 未结 7 1207
无人及你
无人及你 2021-02-01 09:06

I have two python versions: Python 2.5 and Python 2.7. When I\'m setting up django, I want to use Python 2.7, but django is using Python 2.5 somehow.

How can I make sur

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-01 09:14

    Make two simple .cmd files:

    python25.cmd:

    @echo off
    set PYTHONHOME=c:\python25
    set PATH=%PATH%;c:\python25
    

    python27.cmd:

    @echo off
    set PYTHONHOME=c:\python27
    set PATH=%PATH%;c:\python27
    

    Now you can switch between Python 2.5 and 2.7. :)

提交回复
热议问题