8

I had python 2.7 before and then I installed python 3.4.The OS is windows 10

I have renamed

C:\python27\python.exe to python2.exe (when I run python2 --version it shows correct version)

and

C:\python34\python.exe to python3.exe (when I run python3 --version it shows correct version)

I have set the path variable manually and there is no space etc.

I was trying to create a virtual environment and assign python34 to this new environment. I was going through this SO reference -- Using VirtualEnv with multiple Python versions on windows

prompt>> virtualenv -p c:\Python34\python3.exe casenv

But I got an error--

Fatal error in launcher: Unable to create process using '"'

Do I need to install virtualenv again for python34 or somewhere I need to set virtualenv path for each python installation.

Any help is highly welcomed.

python_fan
  • 113
  • 2
  • 15
Prithviraj Mitra
  • 11,002
  • 13
  • 58
  • 99
  • Sorted out. The problem was in renaming the previous python.exe file to python2. I changed back to python.exe and then it all worked. – Prithviraj Mitra Aug 05 '17 at 11:24
  • Instead of renaming "python.exe", use `mklink` in an elevated command prompt to create symbolic links to it named "python2.exe" and "python2.7.exe". – Eryk Sun Aug 06 '17 at 12:39

5 Answers5

16

In my case, i had installed python 3.6 and uninstalled python 2.7 when i got this error. Completely deleting the C:\Python2.7 directory did the trick.

Sergiu Ionescu
  • 341
  • 2
  • 7
1

This error is usually caused because of python directory of different versions stored at same location. i.e in my case I was using python 3.5.X for development and when I updated to 3.7.6 I got this error. People on internet suggest that it is because of pip but main cause is 2 or more python directory.

The following steps should fix it:

  1. Uninstall previous python version (or use virtual environment if you want to play with multiple python version)
  2. Delete the python directory you are not using (as it causes confusion for terminal to understand which python path it should pick to execute the command)
  3. and this should fix the error of fatal error in launcher unable to create process using ' '
kkuilla
  • 2,226
  • 3
  • 34
  • 37
0

Pip version: 10.0.0 Python version: 3.6.5 64 bit Operating system: Windows 7 Ultimate, Service Pack 1, 64-bit Description: After upgrading pip to the version 10.0.0 (from Pycharm, that is using pip as a package) any attempts to start updated pip cause an error:

Fatal error in launcher: Unable to create process using '""c:\program files\python 3.6\python.exe" "C:\Program Files\Python 3.6\Scripts\pip.EXE"'

Command python -m pip works as expected.

I found text "Fatal error in launcher" only in executables: src\pip_vendor\distlib\t32.exe src\pip_vendor\distlib\t64.exe

and in the pip.exe itself.

After

python -m pip uninstall pip easy_install.exe pip

error disappeared.

It is interesting, that initially pip.exe had almost the same size as t64.exe, now it significantly shorter.

Itamar Mushkin
  • 2,803
  • 2
  • 16
  • 32
0

If someone came after installing a newer version like 3.X and uninstalled the older version, what you need to do is to delete the old version's folder from C Drive.

Surya
  • 554
  • 5
  • 10
0

Clean Fix (Windows)

  • The fastest way to fix the issue you were facing is to uninstall and reinstall.

Why it happened?

  • You probably moved the directory where python was installed.
  • You probably have both environmental variables listed in Environmental Variables.

Things to consider

  • You can only use 1 active version of python at a time if you use the MSI installer.

  • If you downloaded the zip file of Python, you can have unlimited versions in your computer BUT you can only have 1 active version under Environmental Variables.

  • You can always use any version of Python explicitly by writing the direct path to the specific location of the version of Python.

Full Array
  • 769
  • 7
  • 12