操作系统:mac
python版本:安装有2.6和2.7
sys.path:包含django的安装路径
问题:django项目启动的时候出现错误如下
liuxiaochundeMac-mini:ez2_1 Liuxc$ python2.6 manage.py runserver
Traceback (most recent call last):
File "manage.py", line 7, in <module>
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
liuxiaochundeMac-mini:ez2_1 Liuxc$ python2.7 manage.py runserver
Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "/Library/Python/2.7/site-packages/django/core/management/init.py", line 338, in execute_from_command_line
utility.execute()
File "/Library/Python/2.7/site-packages/django/core/management/init.py", line 312, in execute
django.setup()
File "/Library/Python/2.7/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/Library/Python/2.7/site-packages/django/apps/config.py", line 112, in create
mod = import_module(mod_path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named django