Forums

Virtual Environments mangament

  1. I've created the first venv with mkvirtualenv in my home directory as discribed in tutorial.
  2. Created and configured first app in web.

I added second app :

  1. Copied venv to venv2. I need the same environment but I decided to separate it.
  2. Created and configured the second app in web.

Both applications works fine.

But the problem is when I want to activate the second app: 1. I change directory to venv2/bin 2. Activate it by: source activate

In console I have information about activating environment but command which python returns the path to the first venv.

I am confused.

I found the answer:

Blockquote Copying virtual environments is not well supported. Each virtualenv has path information hard-coded into it, and there may be cases where the copy code does not know it needs to update a particular file. Use with caution.

Better to re-create. Venvs are not portable.