开发者

virtualenv using wrong django

I have a virtualenv all set up with the --no-site-packages flag on.

开发者_如何学C

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:

  1. Are you using python from your virtualenv?

    which python

    /home/raisins/.virtualenvs/yourenv/bin/python

  2. 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']

  3. When you run your pip install command, have you activated your virtual environment?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜