python - Powershell Python : Change version used

标签 python powershell

我使用的是 windows xp。

我正在尝试在 powershell 中使用 Python。在我的电脑上,我同时安装了 Python 3.3 和 2.7。我正在尝试运行 2.7,但每当我在 powershell 中键入“python”时,它都会打开 3.3。

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

最佳答案

在 powershell 中,输入以下内容:

$Env:PY_PYTHON = 2

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

关于python - Powershell Python : Change version used,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13328258/

相关文章:

powershell - 双星号是什么意思?

file - 如何复制某些文件(无文件夹层次结构),但不覆盖现有文件?

powershell - 如何使用&运算符从PowerShell调用MSBuild?

powershell - 如何使用PowerShell更新SharePoint日历?

powershell - 从Powershell编译名称为1.0的gcc库

python - 无法在子包中导入父包的模块

python - 来自多个数据框列的分类数据的散点图

python数据框将周数转换为月份

python - 如何使用 Python 对 Spark 中的 LIBSVM 文件进行特征选择和缩减?

Python 的 imp.reload() 函数不起作用?