简体   繁体   English

如何在 Windows10 Path 中使用两个 Python3.x 版本访问 pip3?

[英]How to access pip3 with two Python3.x versions in Windows10 Path?

I have added two Python versions to my path.我在我的路径中添加了两个 Python 版本。

C:\Program Files\Python38\Scripts\
C:\Program Files\Python38\
C:\Program Files\Python37\Scripts\
C:\Program Files\Python37\

Within each \\Scripts directory are these pip executables:每个\\Scripts目录中都有这些 pip 可执行文件:

Program Files/Python38/Scripts程序文件/Python38/脚本
├── easy_install-3.8.exe ├── easy_install-3.8.exe
├── easy_install.exe ├── easy_install.exe
├── f2py.exe ├── f2py.exe
├── pip-script.py ├── pip脚本.py
├── pip.exe ├── pip.exe
├── pip3-script.py ├── pip3-script.py
├── pip3.8-script.py ├── pip3.8-script.py
├── pip3.8.exe ├── pip3.8.exe
└── pip3.exe └── pip3.exe

.Program Files/Python37/Scripts .Program Files/Python37/Scripts
├── easy_install-3.7.exe ├── easy_install-3.7.exe
├── easy_install.exe ├── easy_install.exe
├── pip.exe ├── pip.exe
├── pip3.7.exe ├── pip3.7.exe
└── pip3.exe └── pip3.exe

I cannot seem to use pip3 since adding Python3.7 to my Path environment variable.自从将 Python3.7 添加到我的 Path 环境变量后,我似乎无法使用pip3

C:\Users\User>python38
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.         
>>>
C:\Users\User>python38 pip3.8
python38: can't open file 'pip3.8': [Errno 2] No such file or directory
C:\Users\User>pip3.8
'pip3.8' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\User>python37 
Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.         
>>>
C:\Users\User>python38 pip3.7
python38: can't open file 'pip3.7': [Errno 2] No such file or directory
C:\Users\User>pip3.7
'pip3.7' is not recognized as an internal or external command,
operable program or batch file.

How can I use pip3?我如何使用 pip3?

Try to use尝试使用

python-3.7 -m pip install pack

Where pack your packet在哪里打包你的包

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

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