1

So, I use Virtual Environment for my project python/django. I can activate the Virtual Environment in my server. Please see the below result: enter image description here

But when I use the "which pip" command or "which python" command. It can not specify the pip or python in Virtual Environment. What you can see the below demo. It used the pip and python in my server instead of Virtual Environment enter image description here

So what's happening? Please help me?

Thanks for your helping!

Duy Trần
  • 204
  • 3
  • 15

1 Answers1

1

Rather than copy a virtualenv, it's better to create a new one. To copy your packages from your original virtualenv, you should use :

pip freeze > requirements.txt

In order to re-install your packages in the final virtualenv you use :

pip install -r requirements.txt
Samuel Dauzon
  • 10,744
  • 13
  • 61
  • 94