Powershell Python:更改使用的版本

The*_*Guy 3 python powershell

我正在使用Windows XP.

我正在尝试在PowerShell中使用Python.在我的电脑上,我安装了Python 3.3和2.7.我正在尝试运行2.7但是每当我在powershell中输入"python"它就会打开3.3.

如何选择要运行的Python版本?

Chi*_*ura 8

在powershell中,输入以下内容:

$Env:PY_PYTHON = 2
Run Code Online (Sandbox Code Playgroud)

然后尝试使用命令"py".它应该启动Python 2.7.如果你想再次运行Python 3.3,"py -3"就可以了.