我正在尝试在我的Windows 10系统上安装pip。我已经获得了get-pip.py文件并运行了该命令
python get-pip.py
这是终端的快照
$ python get-pip.py
Collecting pip
Using cached
https://files.pythonhosted.org/packages/46/dc/7fd5df840e
fb3e56c8b4f768793a237ec4ee59891959d6a215d63f727023/pip-19.0.1-py2
.py3-none-any.whl
Collecting setuptools
Using cached
https://files.pythonhosted.org/packages/ff/47/1dfa4795e
24fd6f93d5d58602dd716c3f101cfd5a77cd9acbe519b44a0a9/wheel-0.32.3-py2.py3-
none-any.whl
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-19.0.1 setuptools-40.8.0 wheel-0.32.3
现在当我尝试使用以下命令检查版本时
pip -V
我明白了 -Traceback (most recent call last):
File "runpy.py", line 193, in _run_module_as_main
File "runpy.py", line 85, in _run_code
File "C:\Program Files\Python\python-3.6.3-embed-
amd64\Scripts\pip.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'
为什么会这样?它刚刚说 pip 安装成功了,但是当我尝试查看版本以检查是否已安装时,它显示“没有找到名为'pip'的模块”。此外,我已经将 C:/Program/Files/Python/python3/Scripts 包含在 PATH 变量中。请帮忙! ! ! !
C:/Program/Files/Python/python3/Scripts
,而是c:/users/<your user>/appdata/local/programs/python/python36/scripts/
。如果这仍然对您没有用,我建议您重新安装Python,并确保在安装时单击add PATH variable
,这样安装过程将为您处理这个问题。 - typedef struct James