Adam LaMorre
Adam LaMorre

Reputation: 695

Where are python packages stored in a virtual environment?

I need to find the python packages within my virtual environment.

When I run pip freeze I can see all the packages in the virtual environment.

However, when I cd ./venv/ and run tree Pillow (or manually search) I cannot find any installed package.

Any idea where they are stored?

Upvotes: 1

Views: 2003

Answers (2)

sinoroc
sinoroc

Reputation: 22245

Ask pip to tell you where it installed the project with the following command:

$ path/to/venv/bin/python -m pip show --files Pillow

Upvotes: 2

drd
drd

Reputation: 605

from virtualenv do pip -V

It will be in : <virtual env root dir> + lib

example from my terminal

(vams_test) C:\VAMS\jiras\vams>pip -V
pip 19.2.3 from c:\vams\code\copy_v0.1\vams_test\lib\site-packages\pip (python 3.7)

Upvotes: 1

Related Questions