How to use different version of Django in virtualenv -


i'm trying run openblock within virtualenv, problem openblock requires django 1.2.5 , i've got django 1.1.1 on server.

$ python -c "import django;print django.get_version()" returns 1.1.1

after activating virtualenv, same command returns 1.2.5. far good.

but when run yolk -l within virtualenv shows 1.1.1 active , 1.2.5 non-active.

you need install yolk virtualenv otherwise it'll list system packages instead; yolk doesn't know current virtualenv. run pip install yolk virtualenv activated. (if you've created virtualenv without --no-site-packages, you'll need run pip install --upgrade yolk).

i recreated scenario (except debian squeeze os version of django 1.2.3) , worked. --no-site-packages:

% . foo/bin/activate (foo)% yolk -l django django          - 1.2.5        - active  (foo)% deactivate 

and without:

% . bar/bin/activate (bar)% yolk -l django django          - 1.2.3        - non-active development (/usr/lib/pymodules/python2.6) django          - 1.2.5        - active  

in general, if run python programs installed outside virtualenv, shouldn't expect them know virtualenv unless they've been written aware of virtualenv (e.g. pip's pip_respect_virtualenv).


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -