django.setup()抛出“ImportError:无法导入名称update_contenttypes”

时间:2017-05-19 18:07:06

标签: python django python-2.7 django-1.8

回溯:

   Traceback (most recent call last):
      File "my_script.py", line 16, in <module>
        django.setup()
      File "c:\Python27\lib\site-packages\django\__init__.py", line 18, in setup
        apps.populate(settings.INSTALLED_APPS)
      File "c:\Python27\lib\site-packages\django\apps\registry.py", line 85, in populate
        app_config = AppConfig.create(entry)
      File "c:\Python27\lib\site-packages\django\apps\config.py", line 112, in create
        mod = import_module(mod_path)
      File "c:\Python27\lib\importlib\__init__.py", line 37, in import_module
        __import__(name)
      File "c:\Python27\lib\site-packages\django\contrib\contenttypes\apps.py", line 7, in
    <module>
        from .management import update_contenttypes
    ImportError: cannot import name update_contenttypes

脚本用于运行正常,直到我尝试更新django-allauth(更新了大量其他软件包:pytz,requests,oauthlib,requests-oauthlib和Django(虽然我在Ctrl-C'd开始时想要)更新Django。我正在使用Django 1.8.5)

0 个答案:

没有答案