Powershell 中的 Python 2 和 3

标签 python powershell

我的电脑上有两个版本,因为我正在学习不同的教程(我仍然是菜鸟)。我在这里看到了几个类似的问题,但没有任何特定于 Powershell 的问题。

当我在 Powershell 中运行 python 时,它会显示 2.7,但如何指定我需要 Python 3?还有其他我需要注意的问题吗?例如,当从 Notepad++ 运行脚本时?

最佳答案

命令“py”(如果 v2 是默认值)或“py -2”应启动 Python 2.7,“py -3”应启动 Python 3。请参阅 here了解详情。

我找到了这个post以及。这可能会有所帮助。

This one将帮助您检查当前使用的版本,如果您想更改,请参阅 here .

Should you want to pop out of the shell .

干杯,享受 Python 的乐趣;)

关于Powershell 中的 Python 2 和 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39016249/

相关文章:

javascript - ERROR :root:code for hash md5 was not found. npm 安装错误

python - 将计算列附加到现有数据框

powershell - 使用 Ansible 执行 Powershell DSC

powershell - 如何为VIM安装插件?

powershell - 使用多个psobject时,Get-Member不返回NoteProperty

python - 从饼图中删除标签会移动图例框

python - MySQL 和 Python : commits from one thread not visible to another thread,,但从 MySQL Workbench 可见

python - 使用 NetworkX 计算 2 个节点之间的命中时间

c# - 如何从签名文件中获取签名者的姓名

function - Powershell:从函数调用交互式程序隐藏程序的输出。如何解决这个问题?