Reputation: 31548
I have my Django project folder and inside that i have my virtualenv
folder
I have few questions
I have packages already installed in main installation and as well in virtual env. Dont those packages mix with each other. I mean if i have old version in main installation and new version in virtual env how does the system knows which one to choose
Suppose i move my project folder to new computer than can i use same virtual env folder because it was in the same app directory or i have to start all over again
How will i know that pip install package to virtual env or main installation
Upvotes: 1
Views: 292
Reputation: 33410
Unless you created the virtualenv with --system-site-packages, packages don't mix at all. If they did, Virtualenv has priority.
If the path doesn't change, there are chances that you can reuse it. You could make a virtualenv --relocatable if the path changes. But you should make a requirements file and be able to regenerate a fresh virtualenv in one pip -r req.txt
command.
If a virtualenv is activated, pip will install in the virtualenv, it has priority.
Upvotes: 2