简体   繁体   English

如何在 Windows 上安装 pip3?

[英]How to install pip3 on Windows?

I use python 2.7, 3.5.2 and 3.6.我使用 python 2.7、3.5.2 和 3.6。 Normally pip3 is installed with python3.x.通常pip3与 python3.x pip3安装。 But ...但 ...

The code:编码:

where pip3

gives me:给我:

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

How can I fix this?我怎样才能解决这个问题?

On Windows pip3 should be in the Scripts path of your Python installation:在 Windows 上, pip3应该在 Python 安装的Scripts路径中:

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

Use:用:

where python

to find out where your Python executable(s) is/are located.找出您的 Python 可执行文件所在的位置。 The result should look like this:结果应如下所示:

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

or:或者:

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

You can check if pip3 works with this absolute path:您可以检查pip3适用于此绝对路径:

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

if yes, add C:\\path\\to\\python\\Scripts to your environmental variable PATH .如果是,请将C:\\path\\to\\python\\Scripts到您的环境变量PATH

For python3.5.3, pip3 is also installed when you install python.对于python3.5.3,安装python时也安装了pip3。 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.然后你可以找到pip3所在的位置并手动将其添加到路径中。

I Installed pip and pip3 in my windows 10 system easily from the official Microsoft store .我从 Microsoft 官方商店轻松地在我的 Windows 10 系统中安装了 pip 和 pip3

Search python3.9 in Microsoft store .在 Microsoft Store 中搜索 python3.9 then, click on "Get" to install on you windows platform.然后,单击“获取”以在您的 Windows 平台上安装。

It will install all python install packagers like PIP, PIP3.它将安装所有 python 安装打包程序,如 PIP、PIP3。

Thanks -:)谢谢 -:)

By default installer from python.org adds this PATH variable: %USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps but pip3 installs to %USERPROFILE%\\AppData\\Local\\Programs\\Python\\Python39\\Scripts .默认情况下, python.org 的安装程序添加此 PATH 变量: %USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsAppspip3安装到%USERPROFILE%\\AppData\\Local\\Programs\\Python\\Python39\\Scripts

You should add this path %USERPROFILE%\\AppData\\Local\\Programs\\Python\\Python39\\Scripts to your PATH variables.您应该将此路径%USERPROFILE%\\AppData\\Local\\Programs\\Python\\Python39\\Scripts到您的PATH变量中。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM