virtualenv using wrong django
I have a virtualenv all set up with the --no-site-packages
flag on.
When I did pip install django==1.3
everything seemed to install just fine.
When I ran python manage.py sycndb
I get the error.
ImportError django.contrib.staticfiles: No module named staticfiles
I know this is a feature of 1.3 and should work. When I go in to the python shell and type
>>> import django
>>> django.VERSION
(1, 2, 1, 'alpha', 0)
Any idea why I get back 1.2 I have the vitrualenv on and know I am in it because I can import other things I have installed. Everything but django seems to work. It seems I am getting a ghost verson or another version installed on my machine, but that shouldnt happen beacause of the --no-site-packages, right?
Can you perform the following checks:
Are you using python from your virtualenv?
which python
/home/raisins/.virtualenvs/yourenv/bin/python
Open a python shell and check where your django is coming from:
python
>>> import django
>>> django.__path__
>>> ['/home/raisins/.virtualenvs/yourenv/lib/python2.6/site-packages/django']
When you run your
pip install
command, have you activated your virtual environment?
精彩评论