pip/easy_install failure: failed to create process

Posted on

Question :

pip/easy_install failure: failed to create process

After following this article: How do I install pip on Windows? on my Windows system using Enthought Canopy 64 Bit system, I cannot get pip or easy_install to work due to error:

pip install requests
failed to create process

I tried re-installing setuptools, running cmd prompt as admin without any effect.

Asked By: Matt


Answer #1:

When I encountered this, it was because I’d manually renamed the directory python was in. This meant that both setuptools and pip had to be reinstalled. Or, I had to manually rename the python directory to what it had been previously.

Answered By: 410 gone

Answer #2:

It will help after changing the PATH to python in environment variables:

python -m pip install --upgrade pip --force-reinstall

Answered By: logical8

Answer #3:

Just ran into this. Sort of. Pip worked for me, but after installing pytest-watch, running the ptw script was giving this error.

For some reason, pip stopped quoting the #! in ptw-script.py:

#!C:Program Files (x86)Pythonpython.exe

It worked after I added quotes manually:

#!"C:Program Files (x86)Pythonpython.exe"

I don’t really know why this suddenly started happening. Adding this here in case anyone else coming here from Google runs into the same thing.

Here’s a related pip issue (I think).

Answered By: Joe

Answer #4:

If you intentionally want to rename the folder where python.exe resides, you should also modify all python files in the Scripts folder. So a third solution would be to modify the python files as well: the first line in pip-2.7-script.py originally contain:


Modifying this path to the new Python folder fixes the problem.

(P.S. Unfortunately I cannot yet reply to answers, so I’ll reply as a new answer because I thought it could be useful for other people as well).

Answered By: mfiers

Answer #5:

To fix this error (after you change the folder where python is installed) run force-reinstall for pip and pyinstaller, like this:

python -m pip install --upgrade pip --force-reinstall

python -m pip install --upgrade pyinstaller --force-reinstall
Answered By: Teo

Answer #6:

I ran into this bug while installing an older version of Python (3.5.2) for compatibility with some aws-adfs scripting. I installed aws-adfs with pip, on Windows 10, and found that while Python is installed to a directory path with spaces in it you will get the failed to create process error.

The pip maintainers say that it was a deeper problem with setuptools and even offered a workaround if you want to patch the installation in place.

But another, easier solution if you’re working with older versions of Python is just to reinstall Python to a directory without spaces.

Answered By: worc

Answer #7:

When I came across this problem, I found that my path contained multiple entries for Python. After tidying up my path so that it had an entry for the python installation folder and the scripts folder (in my case C:Python27 and C:Python27Scripts), pip worked properly.

Answered By: Mike P

Answer #8:

Test this. it’s worked correctly for me:

python -m pip install –upgrade pip –force-reinstall

Answered By: M Sadra

Leave a Reply

Your email address will not be published. Required fields are marked *