Fatal error in launcher: Unable to create process using “”C:Program Files (x86)Python33python.exe“ ”C:Program Files (x86)Python33pip.exe“”

Posted on

Question :

Fatal error in launcher: Unable to create process using “”C:Program Files (x86)Python33python.exe“ ”C:Program Files (x86)Python33pip.exe“”

Searching the net this seems to be a problem caused by spaces in the Python installation path.

How do I get pip to work without having to reinstall everything in a path without spaces ?

Asked By: Arc

||

Answer #1:

it seems that

python -m pip install XXX 

will work anyway (worked for me)
(see link by user474491)

Answered By: user4154243

Answer #2:

On Windows at least, pip stores the execution path in the executable pip.exe when it is installed.

Edit this file using a hex editor or WordPad (you have to save it as plain text then to retain binary data), change the path to Python with quotes and spaces like this:

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

to an escaped path without spaces and quotes and pad with spaces (dots at the end should be spaces):

#!C:Progra~2Python33python.exe.............

For “C:Program Files”, this path would probably be “C:Progra~1” (shortened path names in DOS / Windows 3.x notation use tilde and numbers).
Windows provides this alternative notation for backwards compatibility with DOS / Windows 3.x apps.

Note that as this is a binary file, you should not change the file size which may break the executable, hence the padding.

Save with administrator privileges, make sure it is actually saved at the target location and try again.

You might also need to set the PATH variable to use the ~ notation for the path to pip.

Answered By: Arc

Answer #3:

having the same trouble I read in https://pip.pypa.io/en/latest/installing.html#install-pip that to update pip it’s:

python -m pip install -U pip

So I made (for example)

python -m pip install virtualenv

And it worked! So you can do the same being ‘virtualenv’ another package you want.

Answered By: MiguelCldn

Answer #4:

python -m pip

really works for the problem Fatal error in launcher: Unable to create process using '"'.Worked on Windows 10

Answered By: Joel K Thomas

Answer #5:

I had a similar issue and upgrading pip fixed it for me.

python -m pip install --upgrade pip 

This was on Windows and the path to python inside pip.exe was incorrect. See Archimedix answer for more information about the path.

Answered By: Johan Gov

Answer #6:

Here’s how I solved it:

  1. open pip.exe in 7zip and extract __main__.py to PythonScripts folder.

    In my case it was C:Program Files (x86)Python27Scripts

  2. Rename __main__.py to pip.py

  3. Run it! python pip.py install something

EDIT:

If you want to be able to do pip install something from anywhere, do this too:

  1. rename pip.py to pip2.py (to avoid import pip errors)

  2. make C:Program Files (x86)Python27pip.bat with the following contents:

python “C:Program Files (x86)Python27Scriptspip2.py” %1 %2 %3 %4
%5 %6 %7 %8 %9

  1. add C:Program Files (x86)Python27 to your PATH (if is not already)

  2. Run it! pip install something

Answered By: apple16

Answer #7:

This is a known Bug when there is a space in the virtualenv path. Correction has been made, and will be available in the next version.

Answered By: user474491

Answer #8:

i had same issue and did a pip upgrade using following and now it works fine.
python -m pip install --upgrade pip

Answered By: Dev

Leave a Reply

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