首页 > 解决方案 > 如何在 Windows10 Path 中使用两个 Python3.x 版本访问 pip3?

问题描述

我在我的路径中添加了两个 Python 版本。

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

每个\Scripts目录中都有这些 pip 可执行文件:

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

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

pip3自从将 Python3.7 添加到我的 Path 环境变量后,我似乎无法使用。

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.

如何使用 pip3?

标签: pythonpython-3.xwindowspipenvironment-variables

解决方案


尝试使用

python-3.7 -m pip install pack

在哪里打包你的包


推荐阅读