django under virtualenv causing importerror -


in ubuntu lucid ,i installed python2.7.5 , set virtualenv .in terminal typed workon envpy275 , using pip installed these sw requirements file

python==2.7.5 django==1.4.3 south==0.7.6 distribute==0.6.28 dj-database-url==0.2.1 django-registration==0.8 numpy==1.4.1 matplotlib==1.2.0 psycopg2==2.4.6 python-memcached==1.48 simplejson==3.0.7 wsgiref==0.1.2  $workon envpy275 (envpy27)me@ubuntu:~/dev/python/django/myapp$ pip install -r requirements.txt 

this installed these softwares ~/.virtualenv/envpy275/lib/python2.7/site-packages.

my system has django1.4 @ /home/me/django-1.4.and .bashrc file has

pythonpath=/home/me/django-1.4 pythonpath=$pythonpath:/home/me/dev/python/django/myapp 

since project settings file in /home/me/dev/python/django/myapp/mysite directory set django_settings_module below

 (envpy27)me@ubuntu:~/dev/python/django/myapp$ export django_settings_module='mysite.setings' 

then,at terminal ,i try run django server

(envpy27)me@ubuntu:~/dev/python/django/myapp$ python manage.py runserver 

this produced following warning , error

/home/me/.virtualenvs/envpy275/lib/python2.7/site-packages/pytz/__init__.py:35: userwarning:  module django imported      /home/me/django-1.4/django/__init__.pyc, /home/me/.virtualenvs/envpy275/lib/python2.7/site-packages  being added sys.path  pkg_resources import resource_stream   ...   ...  file "/home/me/django-1.4/django/conf/__init__.py", line 95, in __init__   raise importerror("could not import settings '%s' (is on sys.path?): %s" % (self.settings_module, e))  importerror: not import settings 'mysite.setings' (is on sys.path?): no module named setings 

you may have typo set django_settings_module mysite.setings - mysite.settings pointing file mysite/settings.py


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -