2

I added the following python paths to the Path in Windows for system variables.

C:\Project1\python\Python310-32\Scripts
C:\Project1\python\Python310-32

When I run pip upgrade I get the following error:

Unable to create process using '"C:\Project0\python\Python310-32\python.exe"  "C:\Project1\python\Python310-32\Scripts\pip.exe" upgrade': The system cannot find the file specified.

My question is despite me adding the path to the system variables, restarting the computer multiple times, why is my python.exe still pointed to an old project in project0 instead of project 1.

I am trying to install/get a particular package under site-packages to install/work for my project. But that particular library under site-packages isn't being found.

Yash Jain
  • 442
  • 7
  • 19
  • Is that Python310-32-directory created with `virtualenv`? – Juha Apr 12 '23 at 17:29
  • I am unsure, I downloaded the project from Github. Followed directions to add the path in system variables. How do I find out? – Yash Jain Apr 12 '23 at 17:31
  • Does Python310-32 -directory contain file `pyvenv.cfg`, or do the Scripts-directory contain files starting `activate`? – Juha Apr 12 '23 at 17:36
  • No they don't... – Yash Jain Apr 12 '23 at 17:45
  • OK, what is the output of the following command? (give the path explicitly, do not use PATH): `C:\Project1\python\Python310-32\Scripts\pip --version` – Juha Apr 12 '23 at 17:47
  • Fatal error in launcher: Unable to create process using '"C:\Project0\python\Python310-32\python.exe" "C:\Project1\python\Python310-32\Scripts\pip.exe" --version': The system cannot find the file specified. – Yash Jain Apr 12 '23 at 17:54
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/253117/discussion-between-juha-and-yash-jain). – Juha Apr 12 '23 at 17:59
  • 1
    I found the solution. Check below. – Yash Jain Apr 12 '23 at 18:44

1 Answers1

0

Found the solution:

Update the 'PATH' environment variable to include:

C:\<path>\python\Python310-32\Scripts\;
C:\<path>\python\Python310-32\

Update or create 'PYTHONHOME' environment variable to include:

C:\<path>\python\Python310-32\

Update or create 'PYTHONPATH' environment variable to include:

C:\<path>\python\Python310-32\Scripts\;
C:\<path>\python\Python310-32\
Yash Jain
  • 442
  • 7
  • 19