我最近尝试卸载 Python 3.5.2 并安装了 Python 3.6.0。我曾经python
在命令行中使用从命令行运行 Python 3.5.2,并py
运行 Python 2.7.12。现在,python
运行 Python 3.5.2,并py
运行 Python 3.6.0。我正在运行 Windows 10,并且python3
, python2
, py2
, 并且py3
不执行任何操作。
问问题
3140 次
1 回答
5
不要费心将 Python 添加到路径中。只需使用:
py Run highest version of Python (override with PY_PTYHON environment variable).
py -2 Run highest version of Python 2.
py -3 Run highest verssion of Python 3.
py -2.7 Run Python 2.7.
py -2.7-32 Run python 2.7 32-bit when on a 64-bit system.
更多:https ://docs.python.org/3.6/using/windows.html#python-launcher-for-windows
请注意,您还可以在脚本中指定要使用的版本,例如:
#!python2
#!python3
#!python2.7
于 2017-01-01T00:06:08.153 回答