简体   繁体   中英

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?

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

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

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM