Python – How to fix “pip”

pippythonselenium

I have python 3.8.0 (on a Windows PC)

When I try to run: "pip install selenium" I get the following error:
Fatal error in launcher: Unable to create process using '"c:\python38\python.exe"
"C:\Python38\Scripts\pip.exe" install selenium': The system cannot find
the file specified.

"python pip install selenium" and "py pip install selenium" both give me this Error:
can't open file 'pip': [Errno 2] No such file or directory)

"pip3 install selenium"
Fatal error in launcher: Unable to create process using '"c:\python38\python.exe" error:
"C:\Python38\Scripts\pip3.exe" install selenium': The system cannot find the file specified.

When I run: "python -m pip –version" I get:
pip 20.0.2 from C:\Users\\AppData\Local\Programs\Python\Python38\lib\site-packages\pip (python 3.8)

I'm having the same problems trying to install django as well.

Best Answer

Your output: C:\Users\\AppData\Local\Programs\Python\Python38\lib\site-packages\pip, makes me think that you've messed-up your pip installation.

To recover do the following:

  • Run CMD as admin
  • Do a 'python -m pip install -U --force pip' (this will fix your Pip installation)
  • Then close the CMD and open another admin CMD to make sure you get the PATH updates effectively
  • Do 'pip install -U --force selenium'

This should help to solve the issue.