Global Packages in Pip List When Virtual Environment Activated

19 views Asked by At

I recently ran into an issue where when I call:

python -m venv environmentname
environmentname\Scripts\activate.bat

Pip list shows packages (numpy & pandas) that are not contained in the site-packages folder of the newly created virtual environment.

I tried to uninstall numpy within the virtual environment I get the message:

"Found existing installation: numpy 1.22.2 Not uninstalling numpy at (global loc), outside environment (virtual environment path) Can't uninstall 'numpy'. No files were found to uninstall.

Then, I go back to pip list and I still see them listed.

When I try to install a different version like numpy==1.23.5 it appears to install. But pip list still shows numpy==1.22.2. When I attempt to run other packages that depend on 1.23.5 version it errors out stating I have the incorrect version of numpy installed.

What could be causing this disconnect?

0

There are 0 answers