简体   繁体   中英

Cannot install pip on windows

I downloaded this zip file from python 3.6.5 site and unzipped it to c:\\devel\\opt\\python .

Added it to the path and followed these instructions to install pip. Also tried with this answer at so.

So, this is what I have so far:

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

I'm running windows 7 enterprise, SP 1

Any idea what could I be missing?

I did a little more research and it seems like pip is not supported on the embedded distribution :

Third-party packages should be installed by the application installer alongside the embedded distribution. Using pip to manage dependencies as for a regular Python installation is not supported with this distribution, though with some care it may be possible to include and use pip for automatic updates.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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