Python 如何在 Windows 上安装 pip3?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41501636/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 01:05:30  来源:igfitidea点击:

How to install pip3 on Windows?

pythonwindowspython-3.xpip

提问by kame

I use python 2.7, 3.5.2 and 3.6. Normally pip3is installed with python3.x. But ...

我使用 python 2.7、3.5.2 和 3.6。一般pip3是用python3.x安装的。但 ...

The code:

编码:

where pip3

gives me:

给我:

INFO: Could not find files for the given pattern(s).

How can I fix this?

我怎样才能解决这个问题?

回答by Mike Müller

On Windows pip3should be in the Scriptspath of your Python installation:

在 Windows 上pip3应该在Scripts你的 Python 安装路径中:

C:\path\to\python\Scripts\pip3

Use:

用:

where python

to find out your where the Python executable(s) is/are located. The result should look like this:

找出您的 Python 可执行文件所在的位置。结果应如下所示:

C:\path\to\python\python.exe

or:

或者:

C:\path\to\python\python3.exe

You can if check pip3works with this absolute path:

您可以检查是否pip3使用此绝对路径:

C:\path\to\python\Scripts\pip3

if yes, add C:\path\to\python\Scriptsto your environmental variable PATH.

如果是,请添加C:\path\to\python\Scripts到您的环境变量中PATH

回答by Kris Roofe

For python3.5.3, pip3 is also installed when you install python. When you install it you may not select the add to path. Then you can find where the pip3 located and add it to path manually.

对于python3.5.3,安装python时也安装了pip3。当您安装它时,您可能不会选择添加到路径。然后你可以找到pip3所在的位置并手动将其添加到路径中。

回答by John Health

There is another way to install the pip3: just reinstall 3.6.

还有另一种安装pip3的方法:只需重新安装3.6即可。