在windows 10上设置python pro
已设置Python 3.5和Python 2.7.11但都没有被命令提示符识别。也有下载pip.py,并且命令提示符没有识别它。已将PATH设置为 C:\Python34;C:\Python34\Lib\site-packages\;C:\Python34\Scripts\;
在windows 10上设置python pro
并且还通过安装提示将Python 3.5添加到PATH中。电脑是戴尔,是Windows 10专业版电脑。
'python' is not recognized as an internal or external command, operable program, or batch file.
'pip' is not recognized as an internal or external command, operable program, or batch file.
我认为你必须创建一个名为PYTHONPATH变量,请按照下列步骤
导航到My Computer > Properties > Advanced System Settings > Environment Variables >
然后在系统变量创建一个新变量称为PythonPath
。
在这个变量包括C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\other-foolder-on-the-path
(没有多余的空格)
,如果有人有以上不工作,然后亲切地追加到PATH与C:\Python27
那么就应该肯定工作
这里是一个链接document
您在修改后检查了路径吗?您可能需要关闭并重新打开控制台窗口,或者重新启动以更新环境变量。
请改为尝试py
,它是Python启动器。它应该安装在已经在路径中的C:\ Windows中。这是安装过程中的一个选项(参见下面的对话框底部的选项)。将Python添加到路径中也是一种选择,但安装两个版本只是路径中的第一个工作。
它可以让你挑的Python的版本来运行:
py # Run default python version...PY_PYTHON env. var can override this.
py -3 # Run the latest Python3 found on the system.
py -2 # Run the latest Python2 found on the system.
py -2.7 # Specifically run Python 2.7.
py -2.7-32 # Specifically run 32-bit Python 2.7 on a 64-bit system.
您还可以添加一个#!python3
评论在浏览器的脚本,然后双击该文件的顶部会使用该版本的Python。
也许你应该尝试蟒蛇或Python(X,Y) – efirvida
或者读取安装选项。看到我的回答:) –