Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activating a virtual env not working

I created two virtualenv and I installed two different versions of django. Now I have a problem to activate the two environment, I do like this :

source Django1.6/bin/activate

Then I see that the environment was activated. Then I do :

pip install django # for test

and I get this message :

Requirement already satisfied (use --upgrade to upgrade): 
                                 django in /usr/local/lib/python2.7/dist-packages

This tell that the environment was not activated but it use the default one. Why I'm getting this?

like image 229
Hunsu Avatar asked Jun 03 '14 09:06

Hunsu


People also ask

Why Virtualenv is not working?

To Solve 'virtualenv' is not recognized as an internal or external command, operable program or batch file Error You just need to reinstall virtualenv.


1 Answers

When changing the environment location we must execute virtualenv on the new folder. When looking to activate file I have found this code :

VIRTUAL_ENV="/old/folder"
export VIRTUAL_ENV

This variable will updated when we execute virtualenv on the new folder.

like image 122
Hunsu Avatar answered Oct 12 '22 11:10

Hunsu