0

I have a question about python virtualenv. I get a virtualenv for a project with all packages required to run that project. But when i run it for the first time and it crash 'cause python has some requirements not satisfied. So i check if there is all packages inside:

virtualenv/lib/python2.7/site-packages/

and all packages required are inside.

But when i type:

pip list

packages doesn't shown. So i have to run:

pip install -r requirements.txt

pip downloads them again. So my question is, why pip downloads and reinstall them again if they are installed yet ? And how i can force pip to reinstall all packages inside virtualenv ?

Bob91
  • 103
  • 6
  • Most likely, you ran the "wrong" *pip*. – CristiFati Apr 21 '18 at 14:51
  • yes, the problem was that the scripts (including pip and other stuff) were linked to an old position that in my workspace didn't exist, so i manually edited all scripts and now it works – Bob91 Apr 21 '18 at 15:40

1 Answers1

0

The problem was that all scripts inside the virtualenv were created on another pc with them paths. Indeed when i launched python or pip from virtualenv they ran from my global path 'cause couldn't find virtualenv script path and in particular pip shown my global packages. Fixing directives path of all script inside virtualenb/bin/ to my real virtualenv path solved this issue.

Bob91
  • 103
  • 6