Question

[Solved] 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 ?

Enquirer: Arc

||

Solution #1:

it seems that

python -m pip install XXX 

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

Respondent: user4154243

Solution #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.

Respondent: Arc

Solution #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.

Respondent: MiguelCldn

Solution #4:

python -m pip

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

Respondent: Joel K Thomas

Solution #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.

Respondent: Johan Gov

Solution #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

Respondent: apple16

Solution #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.

Respondent: user474491

Solution #8:

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

Respondent: Dev

Solution #9:

I wrote a script to patch those exe. But the best way is to fix distutil itself.

"""Fix "Fatal error in launcher: Unable to create process using ..." error. Put me besides those EXE made by pip. (They are made by distutils, and used by pip)"""
import re
import sys
import os
from glob import glob


script_path = os.path.dirname(os.path.realpath(__file__))
real_int_path = sys.executable
_t = script_path.rpartition(os.sep)[0] + os.sep + 'python.exe'
if script_path.lower().endswith('scripts') and os.path.isfile(_t):
    real_int_path = _t

print('real interpreter path: ' + real_int_path)
print()

for i in glob('*.exe'):
    with open(i, 'rb+') as f:
        img = f.read()
        match = re.search(rb'#![a-zA-Z]:\.+.exe', img)
        if not match:
            print("can't fix file: " + i)
            continue
        int_path = match.group()[2:].decode()
        int_path_start = match.start() + 2
        int_path_end = match.end()

        if int_path.lower() == real_int_path.lower():
            continue
        print('fix interpreter path: %s in %s' % (int_path, i))
        f.seek(int_path_start)
        f.write(real_int_path.encode())
        f.write(img[int_path_end:])
Respondent: krrr

Solution #10:

I had the same issue on windows 10, after trying all the previous solution the problem persists so I decided to uninstall my python 2.7 and install the version 2.7.13 and it works perfectly.

Respondent: Badr Bellaj

Solution #11:

This can happen if you are using a case-sensitive file system on Windows. You can tell if this is the case if there is both a lib directory and a Lib directory in your venv directory :

> dir

Directory: C:gitcasesensitivefilesystemherevenv

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        4/07/2018   4:10 PM                Include
d-----       22/01/2019   7:52 AM                Lib
d-----       22/01/2019   7:52 AM                lib
d-----       22/01/2019   7:52 AM                Scripts
d-----       22/01/2019   7:52 AM                tcl

To workaround this (until virtualenv.py gets fixed: https://github.com/pypa/virtualenv/issues/935) merge the two lib directories and make venv case-insensitive:

cd venv
move Lib rmthis
move .rmthissite-packages lib
rmdir rmthis
fsutil.exe file setCaseSensitiveInfo . disable
Respondent: cdjc

Solution #12:

Please add this address :

C:Program Files (x86)Python33

in Windows PATH Variable

Though first make sure this is the folder where Python exe file resides, then only add this path to the PATH variable.

To append addresses in PATH variable, Please go to

Control Panel -> Systems -> Advanced System Settings -> Environment
Variables -> System Variables -> Path -> Edit ->

Then append the above mentioned path & click Save

Respondent: Samik Banerjee

Solution #13:

I renamed the executable of python.exe to e.g. python27.exe. In respect to the answer of Archimedix I opened my pip.exe with a Hex-Editor, scrolled to the end of the file and changed the python.exe in the path to python27.exe. While editing make shure you don’t override other informations.

Respondent: Markus Weber

Solution #14:

I added my anwer because I have getting the same error while configure ODDO9 source code in local and its need the exe to run while run exe, I got the same error.

From yesterday I was configure oddo 9.0 (section :- “Python dependencies listed in the requirements.txt file.”) and its need to run PIP exe as

C:YourOdooPath> C:Python27Scriptspip.exe install -r requirements.txt

My oddo path is :- D:Program Files (x86)Odoo 9.0-20151014
My pip location is :- D:Program Files (x86)Python27Scriptspip.exe

So I open command prompt and go to above oddo path and try to run pip exe with these combination, but not given always above error.

  1. D:Program Files (x86)Python27Scriptspip.exe install -r requirements.txt
  2. “D:Program Files (x86)Python27Scriptspip.exe install -r requirements.txt”
    Python27Scriptspip.exe install -r requirements.txt

  3. “Python27/Scripts/pip.exe install -r requirements.txt”

I resolved my issue by the @user4154243 answer, thanks for that.

Step 1: Add variable(if your path is not comes in variable’s path).

Step 2: Go to command prompt, open oddo path where you installed.

Step 3: run this command python -m pip install XXX will run and installed the things.

Respondent: Ajay2707

Solution #15:

i solve my problem in Window
if u install both python2 and python3

u need enter someone Scripts change all file.exe to file27.exe,then it solve

my D:Python27Scripts edit django-admin.exe to django-admin27.exe so it done

Respondent: decemer

Solution #16:

My exact problem was (Fatal error in launcher: Unable to create process using ‘”‘) on windows 10. So I navigated to the “C:Python33Libsite-packages” and deleted django folder and pip folders then reinstalled django using pip and my problem was solved.

Respondent: Norman Pilusa

Solution #17:

I have chosen to install Python for Windows (64bit) not for all users, but just for me.

Reinstalling Python-x64 and checking the advanced option “for all users” solved the pip problem for me.

Respondent: Riki137

Solution #18:

Here is how i fixed it.

  1. Download https://bootstrap.pypa.io/get-pip.py
  2. Active your vitualenv
  3. Navigate to the get-pip.py file and type “python get-pip.py” without quote.

it will reinstall your pip within the environment and uninstall the previous version automatically.

now boom!! install whatever you like

Respondent: Mahabub Rahman

Solution #19:

Try reinstall by using the below link,

Download https://bootstrap.pypa.io/get-pip.py

After download, copy the “get-pip.py” to python installed main dirctory, then open cmd and navigate to python directory and type “python get-pip.py” (without quotes)

Note: Also make sure the python directory is set in the environmental variable.

Hope this might help.

Respondent: M.S. Arun

Solution #20:

For me this problem appeared when I changed the environment path to point to v2.7 which was initially pointing to v3.6. After that, to run pip or virtualenv commands, I had to python -m pip install XXX as mentioned in the answers below.

So, in order to get rid of this, I ran the v2.7 installer again, chose change option and made sure that, add to path option was enabled, and let the installer run. After that everything works as it should.

Respondent: MrClan

Solution #21:

I had this issue and the other fixes on this page didn’t fully solve the problem.

What did solve the problem was going in to my system environment variables and looking at the PATH – I had uninstalled Python 3 but the old path to the Python 3 folder was still there. I’m running only Python 2 on my PC and used Python 2 to install pip.

Deleting the references to the nonexistent Python 3 folders from PATH in addition to upgrading to the latest version of pip fixed the issue.

Respondent: Axesilo

Solution #22:

I had a simpler solution. Using @apple way but rename main.py to pip.py then put it in your python version scripts folder and add scripts folder to your path access it globally. if you don’t want to add it to path you have to cd to scripts and then run pip command.

Respondent: Sahib Khan

Solution #23:

On Windows I had solved this problem in the following way :

1) uninstalled Python

2) navigated to C:UsersMyNameAppDataLocalPrograms(your should turn on hidden files visibility Show hidden files instruction)

3) deleted ‘Python’ folder

4) installed Python

Respondent: darkside

Solution #24:

I have similar problem when I reinstall my python, by uninstalling python3.7 and installing python3.8. But I solved it by removing the previous version of python directory. For me it was located here,

C:Usersyour-usernameAppDataLocalProgramsPython

I deleted the folder named Python37 (for previous version) and keep Python38 (for updated version). This worked because python itself seems having a trouble on finding the right directory for your python scripts.

Respondent: King

Solution #25:

I was trying to install some site-packages like numpy, xgboost and so on, but this error showed up every time:

Fatal error in launcher: Unable to create process using

I’ve tried many ways to solve this problem and found this one, that successfully helped me:

python -m pip freeze

Hope it’ll help someone too.

P.S. I found this solution here: https://stackoverflow.com/a/39733705/10310794

Respondent: Roman Voyt

Solution #26:

You can remove previous python folder and also environment variable path from you pc then Reinstall python .it will be solve

Respondent: user8099291

Solution #27:

Instead of calling ipython directly, it is loaded using Python such as

$ python “full path to ipython.exe”

Respondent: Stephen Kim

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy