Multiple python virtual env
<p>Suppose i have normal system python 2.7 packages in system locations</p>

<p>Then i do</p>

<pre><code>virtualenv env1
</code></pre>

<p>I install all requirements there</p>

<p>Then i deactivate that and do</p>

<pre><code>export PYTHONPATH=$PYTHONPATH:/path/to/env1
</code></pre>

<p>Then i do <code>virtualenv env2</code> and then install new requirements there</p>

<p>then i do this again </p>

<p><code>export PYTHONPATH=$PYTHONPATH:/path/to/env2</code></p>

<p>So my questions is</p>

<p>All the packagaes which are installed in env1 , will not be installed in env2 or env2 will install new packagaes.</p>

<p>I ahve problem where if i <code>pip install packagae1</code> while env2 is activated. it says requirement already met</p>

<p>Then i open python shell and do import mymodule. It says module not found. I can see that module was there in <code>env1</code>.</p>

<p>I had to remove that module from env1 and then install on env2 and then it work.</p>

<p>I want to know whay is that</p>

<p>Firstly, do not change PYTHONPATH manually. 
Steps should look something like this:</p>

<pre><code>[root@demo src]$ source /usr/local/env1/bin/activate
(env1)[root@demo src]$ # pip install blah
(env1)[root@demo src]$ source /usr/local/env2/bin/activate
(env2)[root@demo src]$ #pip install blah
(env2)[root@demo src]$ 
</code></pre>

python linux virtualenv