user
user

Reputation: 973

Where are the files downloaded using pip stored in virtualenv?

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

Upvotes: 19

Views: 31806

Answers (7)

Oliver Prislan
Oliver Prislan

Reputation: 330

if you are using anaconda on windows, there is a file environments.txt in the .conda folder at your users home directory

Upvotes: 0

Stephen W. Wright
Stephen W. Wright

Reputation: 393

Proof Positive location derivation of pipenv installed packages:

Get the install base with '% pipenv --venv'

Run the install command a 2nd time, and pipenv will divulge the packages locations!

% pipenv install django djangorestframework pygments

  1. Installing django... Requirement already satisfied: django in /usr/local/lib/python3.7/site-packages/Django-2.1.1-py3.7.egg (2.1.1)
  2. Requirement already satisfied: pytz in /usr/local/lib/python3.7/site-packages/pytz-2018.5-py3.7.egg (from django) (2018.5)
  3. Adding django to Pipfile's [packages]... Installing djangorestframework... Requirement already satisfied: djangorestframework in /Users/sww/.local/share/virtualenvs/env-YuUv1EZG/lib/python3.7/site-packages (3.8.2)
  4. Adding djangorestframework to Pipfile's [packages]... Installing pygments... Requirement already satisfied: pygments in /Users/sww/.local/share/virtualenvs/env-YuUv1EZG/lib/python3.7/site-packages (2.2.0)

Upvotes: 0

nishant
nishant

Reputation: 31

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

Upvotes: 3

Hiro
Hiro

Reputation: 3072

The packages you download using pip or any other method in a virtual env is stored in the virtual env folder i.e

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

Upvotes: 1

Bengineer
Bengineer

Reputation: 7742

if you're using virtualenvwrapper (which i recommend):

lets say that i'm using already in using the foo virtualenv and I have virtualenvwrapper installed:

$ cdvirtualenv

if this command i'll go to the $VIRTUAL_ENV path which in this case is:

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

in my case to see my virtualenv packages i'll 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 commands cdvirtualenv and lssitepackages comes from "virtualenvwrapper"

Upvotes: 2

Danilo Bargen
Danilo Bargen

Reputation: 19432

To see where your virtualenv files are, enable it and issue the following bash command:

$ echo $VIRTUAL_ENV

Similar to your system's Python installation, the packages are stored inside lib/python2.*/site-packages/ directory. Find your package in there and edit the necessary files.

Upvotes: 21

okm
okm

Reputation: 23871

You need to know the path to env userena, firstly. Then the installed app usually is in path_to_userena/lib/python2.x/site-packages/. Django apps normally does not contain prefix django-, thus userena here.

Or you could find it in Python by

import os.path, userena
os.path.dirname(userena.__file__)

Upvotes: 6

Related Questions