Tuesday, February 9, 2016

manage.py runserver is not working, No module named django.core.management

Hi,
in the past I succeeded to start python server but now I changed VPS and I can't do it.

here is what I get, i tried to find an answer with google but no success:

./manage.py runserver 0.0.0.0:8080
Traceback (most recent call last):
 
File "./manage.py", line 8, in <module>
   
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

I tried sudo, python, python3.4, python2.7, before ./manage, but no success. even if django is not upgraded, it should work, but it is not.

(env)root@mx:~/mercury# pip freeze|grep -i django
Django==1.8.3
(env)root@mx:~/mercury# python
Python 2.7.9 (default, Mar  1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import sys.path
Traceback (most recent call last):
 
File "<stdin>", line 1, in <module>
ImportError: No module named path
>>> print sys.path
['', '/root/env/lib/python2.7', '/root/env/lib/python2.7/plat-x86_64-linux-gnu', '/root/env/lib/python2.7/lib-tk', '/root/env/lib/python2.7/lib-old', '/root/env/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/root/env/local/lib/python2.7/site-packages', '/root/env/lib/python2.7/site-packages']

all requirements are met just it is not upgraded:
(env)root@mx:~/mercury# pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): Django==1.8.3 in /root/env/lib/python3.4/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): mysqlclient==1.3.6 in /root/env/lib/python3.4/site-packages (from -r requirements.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): pycrypto==2.6.1 in /root/env/lib/python3.4/site-packages (from -r requirements.txt (line 3))

any help?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20dae6d9-fc9f-4abd-ab23-d608f72f72b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment