2

my pip version is 19.2.3, should not matter though.

I have some packages installed (maybe by pip install -e), now I have no way to undo it. I have tried clean the entry in easy-install.pth, and run pip uninstall mypackage, but when I run:

  pip freeze |grep my_package

it always there.

And also I have tried make clean to clear all eggs/tox env from my development env too.

I'm wondering where doest pip read the info from?

aaron
  • 61
  • 1
  • 7

1 Answers1

1

The pip freeze command checks your site-packages folder to determine what is or is not installed. The location of this folder will vary depending on a number of factors, including Python version, OS, if you are using a virtual environment, etc. My user install folder on Windows 10, for example, is C:\Users\MyUser\AppData\Roaming\Python\Python37\site-packages

I'm not 100% sure exactly how the process works, but this can be easily verified by running pip freeze, then moving one of your packages out of the site-packages folder and running it again. You will see the package disappear from the list.

The easiest way that I'm aware of to check which folder is being used is to pip show a package that you have installed, e.g., pip show websockets. This will show you the location of the site-packages folder.

Layne Bernardo
  • 676
  • 3
  • 12