Where are the files downloaded with pip stored in virtualenv?

I am on linux mint 12. I created virtualenv called userena . and then I installed django-userena using pip in this virtualenv. I need to edit some django-usrena files. Where are they located?

+6
source share
5 answers

To find out where your virtualenv files are located, enable it and run the following bash command:

 $ echo $VIRTUAL_ENV 

Like your Python system, packages are stored inside the lib/python2.*/site-packages/ directory. Find your package there and edit the necessary files.

+10
source

You need to know the path to env userena, first. Then the installed application is usually located in path_to_userena/lib/python2.x/site-packages/ . Django applications usually do not contain the django- prefix, so userena here.

Or you can find it in Python on

 import os.path, userena os.path.dirname(userena.__file__) 
+4
source

if you use virtualenvwrapper (which I recommend):

lets say that I already use foo virtualenv and I have virtualenvwrapper installed:

 $ cdvirtualenv 

if this command goes to the path $VIRTUAL_ENV , which in this case:

 $ pwd /home/bernardo/.virtualenvs/foo $ ls bin build include lib local 

in my case, to see my virtual packages, I will go to lib/python2.7/site-packages or:

 $ lssitepackages figleaf figleaf-0.6.1-py2.7.egg-info initools INITools-0.3.1-py2.7.egg-info 

the cdvirtualenv and lssitepackages come from "virtualenvwrapper"

+1
source

Packages that you download using pip or any other method in virtual env are stored in the virtual env folder ie

Suppose you are creating a virtual ENV environment, so the downloaded packages will be inside ENV / lib / python2.7 / site-packages

0
source

You will find virtualenv at home/.virtualenvs . In the .virtualenvs directory you will find your virtualenv

0
source

Source: https://habr.com/ru/post/912769/


All Articles