./manage.py runserver 0.0.0.0:8080 is not working, No module named django.core.management

309 views
Skip to first unread message

John Travolta

unread,
Feb 9, 2016, 12:02:25 PM2/9/16
to Django users
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?

Daniel Roseman

unread,
Feb 9, 2016, 1:28:31 PM2/9/16
to Django users
Django is installed for Python 3.4, but you're running the shell and server in Python 2. Do `python3 manage.py ...`.
--
DR

 

John Travolta

unread,
Feb 10, 2016, 2:45:31 AM2/10/16
to Django users


On Tuesday, February 9, 2016 at 7:28:31 PM UTC+1, Daniel Roseman wrote:

Django is installed for Python 3.4, but you're running the shell and server in Python 2. Do `python3 manage.py ...`.
--
DR

 

thank you very much, it solved my problem. 
now I will make new topic, how to configfure apache to deploy python/django application... 

Luis Zárate

unread,
Feb 10, 2016, 1:15:32 PM2/10/16
to django...@googlegroups.com
Please made other thread for that

You need to read the documentation

https://docs.djangoproject.com/en/1.9/howto/deployment/



ohn Travolta <travo...@gmail.com> escribió:
> --
> 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...@googlegroups.com.
> To post to this group, send email to django...@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/30178b4a-c1e5-4013-9ed0-536b88145a3a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
"La utopía sirve para caminar" Fernando Birri



Reply all
Reply to author
Forward
0 new messages