当我执行syncdb
时出现以下错误Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 351, in handle
return self.handle_noargs(**options)
File "/usr/lib/python2.7/site-packages/django/core/management/commands/shell.py", line 18, in handle_noargs
loaded_models = get_models()
File "/usr/lib/python2.7/site-packages/django/db/models/loading.py", line 167, in get_models
self._populate()
File "/usr/lib/python2.7/site-packages/django/db/models/loading.py", line 64, in _populate
self.load_app(app_name)
File "/usr/lib/python2.7/site-packages/django/db/models/loading.py", line 78, in load_app
models = import_module('.models', app_name)
File "/usr/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
.
.
.
.
from south.modelsinspector import add_introspection_rules
ImportError: No module named modelsinspector
答案 0 :(得分:1)
你为什么要安装南0.5?南方的当前版本是0.7.3 - 0.5超过两年,并且是在重组之前添加modelsinspector
模块的日期。删除该版本并安装最新版本。
答案 1 :(得分:0)
您缺少模块modelsinspector。安装它。