您的位置:首页 > 编程语言 > Go语言

Django - “no module named django.core.management”

2016-01-18 19:49 501 查看
在使用Django启动实例应用时,报错:no module named django.core.management
(cmdb)root@ubuntu:/home/xiaofei/cmdb/django-webblog/djblog# ./manage.py syncdb
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
谷歌查询得知:
(cmdb)root@ubuntu:/home/xiaofei/cmdb/django-webblog/djblog# sudo ./manage.py startapp blog
(cmdb)root@ubuntu:/home/xiaofei/cmdb/django-webblog/djblog# sudo ./manage.py syncdb
Creating tables ...
Creating table django_admin_log
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_session

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (leave blank to use 'root'):
Email address:
Password:
Password (again):
Superuser created successfully.
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
也有说是python版本不对或可在manage.py中指定python路径,客官均可以试试。
本文出自 “创者思” 博客,请务必保留此出处http://strongit.blog.51cto.com/10020534/1736289
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: