[英]Django's manage.py gives “no module named django.core.management”
The answers to the other questions about this error on StackOverflow are not resolving my problem. 关于StackOverflow上此错误的其他问题的答案不能解决我的问题。
From beginning, I type: 从一开始,我输入:
$ virtualenv ./env
New python executable in ./env/bin/python2.7
Also creating executable in ./env/bin/python
Installing setuptools, pip...done.
$ source ./env/bin/activate
(env)$ pip install django
Downloading/unpacking django
Downloading Django-1.6.5-py2.py3-none-any.whl (6.7MB): 6.7MB downloaded
Installing collected packages: django
Successfully installed django
Cleaning up...
(env)$ django-admin.py startproject myproject
(env)$ cd myproject
(env)$ python 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
(env)$ which python
/home/twitch/Projects/env/bin/python
(env)$ python --version
Python 2.7.6
Any ideas on why this would happen? 关于为什么会发生任何想法?
It's certanly a pip's install error of your django package. django软件包确实是点子的安装错误。 Try to downloading the django (version of your choice) source from the http://djangoproject.com site, and installing it directly through setup.py. 尝试从http://djangoproject.com网站下载django(您选择的版本)源,然后直接通过setup.py安装它。 Its really simple. 真的很简单。 With your virtualenv activated: 激活您的virtualenv:
And thats it. 就是这样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.