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.
This occurs when trying to execute PIP. I believe the issue is with environment variables but adding the path to environment variables has not helped. I even uninstalled and reinstalled python and had the same problem.
It seems you have an old “pip.exe” that refers to a “python.exe” executable that no longer exists (i.e. “C:\Program Files\Python39\python.exe”). The shell found the broken “pip.exe” by searching the directories in the
PATH environment variable sequentially from beginning to end.
where.exe pip and note the directory of the first result. Check the installed locations of Python with
py.exe -0p. Decide which installation you want to use. In the system environment variable editor, modify
PATH to prefer the installation directory and “Scripts” directory of the desired version. Take into account that the user value of
PATH gets appended to the system value, so the system
PATH has priority.
Alternatively, you can run pip for any installed version via
py.exe [-X[.Y][-32]] -m pip. If no version is specified on the command line, then the “py.exe” launcher uses an active virtual environment, if any, or the configured default version in the
PY_PYTHON environment variable, if set, else the highest installed version of Python.