运行manage.py sync.db后无法通过Django ImportError

时间:2013-04-16 02:21:25

标签: python django

编码很新。我一直在尝试安装这个桌面堆:http://datadesk.github.io/latimes-table-stacker/ 而且我遇到了manage.py syncdb的问题,我无法通过这个特定的错误。我的预感是:我的计算机上有Python 2.6和2.7,而且我不确定如何确保一切都在运行2.7。我感觉2.6的安装情况。

非常感谢任何建议!提前谢谢。

这是我的错误:

Traceback (most recent call last):
  File "manage.py", line 14, in <module>
    execute_manager(settings)
  File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/management/__init__.py", line 459, in execute_manager
    utility.execute()
  File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/management/__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/management/__init__.py", line 69, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/management/commands/__init__.py", line 10, in <module>
    import django.template.loaders.app_directories
  File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/template/loaders/app_directories.py", line 23, in <module>
    raise ImproperlyConfigured('ImportError %s: %s' % (app, e.args[0]))
django.core.exceptions.ImproperlyConfigured: ImportError bakery: No module named bakery

1 个答案:

答案 0 :(得分:0)

谢谢,我确实导入了南方,使用了python manage.py migrate,并为pip和easy_install等所有python2.7命令创建了别名,以确保我没有使用2.6。