NR Technology
NR Technology

Reputation: 73

get-pip.py broken on Windows 10

Get Pip (Python file from Pypa.io) on Windows 10 is not extracting on my laptop. I followed all the instructions on pypa.io - Installing, however, when I tried to execute the file, despite many attempts to fix this, it says:

ERROR: To modify pip, please run the following command: C:\Python27\python.exe -m pip  

So I ran C:\Python27\python.exe -m pip and then it shows another error message:

C:\Python27\python.exe: No module named pip  

I then consulted with a friend of mine, and he said that the second error message is obviously not a file error, but (me reflecting now) is quite logical. Of course it says that there is no module named pip because that was the very thing that I am trying to download. Then it occurred to me that Python must think that I already have it because it is asking me to modify pip. So I looked into this and saw that I had a pip folder but nothing inside it to do with Python.

So this made me think Why is it not downloading? or Why does it think that I already have it?

UPDATE

The Python installer now comes with an option to install pip which should solve any further problems!

Python Installer

Upvotes: 7

Views: 16346

Answers (3)

whitedwarf
whitedwarf

Reputation: 41

I just stumbled upon this very same issue. However, I am using (have to) Python 2.7.8 32-bit.

https://pip.pypa.io/en/latest/installing/ clearly states that

pip is already installed if you are using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from python.org

so that my call to python -m ensurepip --default-pip did in fact result in No module named ensurepip (as I am not using >=2.7.9).

Yet I was finally able to get pip running: instead of using the latest get-pip.py at https://bootstrap.pypa.io/get-pip.py I used https://bootstrap.pypa.io/2.6/get-pip.py.

For future reference, and those who want to compare against any version of get-pip.py in https://github.com/pypa/get-pip:

29af88001263a19911c0911057cc192e  ./get-pip.py      did *not* work for me,
e4bd67ad4de5329bd4291e06ee3ba012  ./2.6/get-pip.py  *did* work for me.

Upvotes: 3

Alex Ziegenhorn
Alex Ziegenhorn

Reputation: 86

Pretty sure that I had the exact same problem as you. I am using Python 2.7.14 64-bit, and when I try to install pip using get-pip.py, I get the exact same error.

I fixed this by simply running the following command:

python -m ensurepip --default-pip

This then installed pip. This is because the version of Python I downloaded is packaged with pip.

Note that this installed pip without the wheel portion, so I then had to run:

python -m pip install --upgrade pip setuptools wheel

After that, everything was ready to go.

Upvotes: 7

GalacticRaph
GalacticRaph

Reputation: 962

You may find it easier to install Python and Pip from the executable from python.org.

pip.pypa.io seems to make installing Python harder than it has to be. Maybe it has a special use case.

Edit: I also recommend uninstalling the current version you have now so there are no conflicts.

Upvotes: 0

Related Questions