Python 3.7 pip install - The system cannot find the path specified

Viewed 5225

I am using Python 3.7 (Activestate) on a windows 10 laptop. All works well until I try to use pip to install a package (any package). From command prompt, when entering "pip install anyPackage" I get an error - "The system cannot find the path specified." no other explanation or detail.

Python is installed in "C:\Python37" and this location is listed in the Control Panel > System > Environment Variables > User Variables.

In the Environment Variables > System Variables I have: C:\Python37\ C:\Python37\DLLs\ C:\Python37\Script\ C:\Python37\Tools\ C:\Python37\Tools\ninja\

Any suggestions on how to get rid of that error, and make pip work?

Many thanks to all

1 Answers

Short : make sure that pip.exe and python.exe are running from the same location. If they don't (perhaps due to PATH environment variable), just delete the one that you don't need.

Longer: when running pip install, check out where it tries to get python For instance, in my own computer, it was:

pip install Fatal error in launcher: Unable to create process using '"c:\program files\python39\python.exe" "C:\Program Files\Python39\Scripts\pip.exe" ': The system cannot find the file specified.

Then I ran: 'where python.exe' // got several paths. 'where pip.exe' // got different paths.

removed the one that I don't use. Voila.

Related