You need to install yolk into the virtualenv otherwise it'll list system packages instead; yolk doesn't know anything about the current virtualenv. So run pip install yolk
with the virtualenv activated. (If you've created your virtualenv without --no-site-packages
, you'll need to run pip install --upgrade yolk
).
I just recreated this scenario (except with Debian squeeze where the OS version of Django is 1.2.3) and it worked. With --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 you run any Python programs installed outside the virtualenv, you shouldn't expect them to know anything about the virtualenv unless they've been written to be aware of virtualenv (e.g. pip's PIP_RESPECT_VIRTUALENV
).