Python 无法在 Windows 10 上安装 PIP
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36136000/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot install PIP on Windows 10
提问by IgorGanapolsky
I ran the Python 3.5.1 installer from https://www.python.org/downloads/release/python-351/. However, on the command line, when I go to run pip
, I see an error: 'pip' is not recognized as an internal or external command
.
我从https://www.python.org/downloads/release/python-351/运行了 Python 3.5.1 安装程序。但是,在命令行上,当我去 run 时pip
,我看到一个错误:'pip' is not recognized as an internal or external command
.
Is there something wrong?
有什么不对?
回答by IgorGanapolsky
The solution is to get the latest pip installer script from:
https://bootstrap.pypa.io/get-pip.py, and install it with python get-pip.py
.
解决方案是从https://bootstrap.pypa.io/get-pip.py获取最新的 pip 安装程序脚本
,并使用python get-pip.py
.
Then you can use commands like python -m pip ...
to your heart's content.
然后,您可以随心所欲python -m pip ...
地使用命令。
回答by chin8628
You must to add pip's path into Environment Variables. Pip is contained in python's script directory.
您必须将 pip 的路径添加到环境变量中。Pip 包含在 python 的脚本目录中。
Example my case: C:\Python34\Scripts\pip.exe
例如我的情况:C:\Python34\Scripts\pip.exe
To add path to environment variables.
添加环境变量的路径。
- Hold Winand press Pause.
- Click Advanced System Settings.
- Click Environment Variables.
- Add
C:\Python34\Scripts
(Sorry I don't know name of python 3.5's directory) to thePath
on System variables. - Restart Command Prompt.
- 按住Win并按下Pause。
- 单击高级系统设置。
- 单击环境变量。
- 添加
C:\Python34\Scripts
(对不起,我不知道 python 3.5 目录的名称)到Path
系统变量。 - 重新启动命令提示符。
Edit
编辑
In another way, you can use pip-Win instead of pip. Read more here: https://sites.google.com/site/pydatalog/python/pip-for-windows
换句话说,您可以使用 pip-Win 代替 pip。在此处阅读更多信息:https: //sites.google.com/site/pydatalog/python/pip-for-windows