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

15,539

Solution 1

You have two versions of Python added to path. To differentiate between 2.7 and 3.6 you have to tell it which version you want otherwise each pip conflicts with the other (it does not know what to install and where) in other words you type pip you could either mean for Python 2 or for Python 3.

Do not rename pip it will break your system (you should not need to rename). Instead use those already provided..

Your system should have these already:

pip is universal. Best for one installation.

pip3 for Python 3. Best to distinguish between Python 2 and 3

pip3.6 to distinguish between different Python 3 installations.

The same goes for Python 2 installation.

pip, pip2 and pip2.7.

You need to use either pip3 (or pip2) or pip3.6 (or pip2.7) to install in future. This will allow the different versions to be recognised:

For Python 2:

pip2 install seaborn

For Python 3:

pip3 install seaborn

You should also now use shebang lines as well now (if you are not already) to distinguish between versions.

Solution 2

the issue is the ambiguity between the two pip that you've mentioned in the Environments. As you mentioned the issue only started occurring when you installed python3 on the same system where python2 was installed and both have pip and hence when you fire up pip in your cmd, Windows System isn't able to pick one out of the two.

Why does your C:>python27 -m pip install seaborn work? Well it's quite simple, since you've mentioned the python27 there, windows knows exactly which pip you're talking about.



How to fix it?

see the edits for this section. (I tried this, it didn't work) Removed it from the final answer to avoid confusion.


Alternatively, what you can do is,

rename your python.exe for python 3 to python3. Don't forget to put it inside your PATH environment. Just use python for python 2, python3 for python 3. Their pip are separated, pip for python 2. pip3 for python 3.

Now, run and see the below commands behave:

# will return the default version of pip
pip --version
# will use the Python 2 version of pip
pip2 --version
# will use the Python 3 version of pip
pip3 --version
Share:
15,539

Related videos on Youtube

Atlas King
Author by

Atlas King

Updated on June 04, 2022

Comments

  • Atlas King
    Atlas King almost 2 years

    I've seen many threads about this, and have tried all options except for completely wiping Python off of my machine and re-downloading everything...

    I'm using a Windows 10, 64-bit machine, and had already downloaded Python2.7. Commands like 'C:\>pip install seaborn' were not an issue.

    I recently downloaded Python3.6, and now my pip will not work - it returns the error in the title.

    I have added C:\Python27, C:\Python36, C:\Python27\Scripts, C:\Python36\Scripts to my Path, and still it won't work.

    If I type in the command C:\>python27 -m pip install seaborn, however, the pip works. I am really confused why I can no longer just type in pip install and have it work.

    Thanks in advance!

  • iam.Carrot
    iam.Carrot about 6 years
    Why are you copying my answer mate? I am gonna flag it
  • Atlas King
    Atlas King about 6 years
    I tried that as well. I renamed each pip.exe as pip27 and pip36, respectively. When I enter 'C:\pip27 install <whatever>', I still get the original error.
  • iam.Carrot
    iam.Carrot about 6 years
    @AtlasKing did you restart your cmd after changing the environment settings and the file names?
  • Atlas King
    Atlas King about 6 years
    @iam.Carrot I closed out of the window, yes. Additional info - I have 3 different pip files for both Python2 and Python 3. They are as follows: pip pip2 pip2.7 Python3 has similar names for its pip files. Why are there 3? I didn't download/delete anything that the default Python download incurred...Could there be a problem there?
  • Xantium
    Xantium about 6 years
    @iam.Carrot I am putting that back in. You method involves renaming. I think otherwise. My solution is different to yours.
  • iam.Carrot
    iam.Carrot about 6 years
    @AtlasKing I've updated the answer can you please try now?
  • iam.Carrot
    iam.Carrot about 6 years
    yeah now it's taken in a different direction. I'll retract the flag. Thanks for the effort on your part. I really appreciate it
  • Xantium
    Xantium about 6 years
    @iam.Carrot Sorry about that I was not copying (and I am pleased that that you told me that it looked similar otherwise I would not have changed it). I am too vague often. I am very sorry for the confusion I caused. :(
  • Atlas King
    Atlas King about 6 years
    @Simon I think I may have goofed up...I tried renaming my original 'pip', the universal .exe :( even now when I call pip, pip2, or pip3, it still gives me the original error. Should I uninstall Python3 and redownload?
  • Xantium
    Xantium about 6 years
    @AtlasKing Have you renamed everything to what is was before. Once you have run pip3 and it should work.
  • Xantium
    Xantium about 6 years
    @AtlasKing If it still does not work remove one of them from path (2.7) and just test pip see if the error goes if it does not you might have to. If it does add it back to path and try what I suggested below.
  • Atlas King
    Atlas King about 6 years
    @Simon I renamed everything to its original/default setting. Still no luck. I also tried removing everything but Python27 and Python27\Scripts from my Path. Also no luck...
  • iam.Carrot
    iam.Carrot about 6 years
    @AtlasKing uninstall python 3 try the pip if it works then great. re-install python 3 in a different directory. Set the environment variables and then fire the 3 commands that I've mentioned pip --version, ``pip2 --version` and pip3 --version in your cmd