无法在Windows上安装pip

时间:2018-06-19 04:31:59

标签: python windows installation pip

我从this网站下载了python 3.6.5个zip文件并将其解压缩到c:\devel\opt\python

将其添加到路径并按照these说明安装pip。同时尝试使用this回答。

所以,这就是我到目前为止所做的:

C:\>echo %PYTHON_HOME%
c:\devel\opt\python

C:\>echo %PATH%
[...]c:\devel\opt\python;c:\devel\opt\python\Scripts;[...]

C:\>python --version
Python 3.6.5

C:\>cd \devel\opt\pip

C:\devel\opt\pip>python get-pip.py
Collecting pip
[...]
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-10.0.1 setuptools-39.2.0 wheel-0.31.1


C:\devel\opt\pip>cd \devel\opt\python\Scripts

C:\devel\opt\python\Scripts>dir
[...]
19/06/2018  01:18 a.m.           102.751 pip.exe
19/06/2018  01:18 a.m.           102.751 pip3.6.exe
19/06/2018  01:18 a.m.           102.751 pip3.exe
19/06/2018  01:18 a.m.           102.748 wheel.exe
[...]

C:\devel\opt\python\Scripts>pip freeze
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:\devel\opt\python\Scripts\pip.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'

C:\devel\opt\python\Scripts>python -m pip freeze
c:\devel\opt\python\python.exe: No module named pip

我正在运行Windows 7 enterprise,SP 1

知道我可能缺少什么?

1 个答案:

答案 0 :(得分:2)

我做了一些研究,似乎embedded distribution不支持pip:

  

应用程序安装程序应安装第三方软件包   与嵌入式发行版一起。使用pip来管理依赖项   至于常规Python安装不支持此功能   分发,虽然有些小心,但可能包括和   使用pip进行自动更新。