jeudi 5 juin 2014

manage.py - ImportError: No module named django


Vote count:

0




I just ported a working django app from a windows system to ubuntu by just copying all the files to /var/www/some/dir/djangoApp. But now, when executing



python manage.py runserver 8080


I get the Error:



ImportError: no module named django


I have already installed a fresh version of django with python setup.py install to /usr/local/lib/python2.7/dist-packages/django/ and added the path to PYTHONPATH.


The linux system in not maintained by me and has numerous python versions installed.


calling >>> import django in the shell does not raise an ImportError.


I'm very confused. Please help me!


Here's the traceback from the console:



Traceback (most recent call last):
File "manage.py", line 13, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 280, in execute
translation.activate('en-us')
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/__init__.py", line 130, in activate
return _trans.activate(language)
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 188, in activate
_active.value = translation(language)
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 177, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 159, in _fetch
app = import_module(appname)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
ImportError: No module named django


asked 39 secs ago






Aucun commentaire:

Enregistrer un commentaire