我在Django 1.8.7上,我刚刚安装了Django-Allauth,通过克隆repo并在我的webapp终端上的应用程序目录中运行pip install.现在当我运行manage.py migrate时,我收到此错误:
?src git:(master) ? python manage.py migrate Traceback (most recent call last): File "manage.py", line 8, infrom django.core.management import execute_from_command_line File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 10, in from django.apps import apps File "/Library/Python/2.7/site-packages/django/apps/__init__.py", line 1, in from .config import AppConfig File "/Library/Python/2.7/site-packages/django/apps/config.py", line 6, in from django.utils.module_loading import module_has_submodule File "/Library/Python/2.7/site-packages/django/utils/module_loading.py", line 4, in from importlib import import_module File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 6, in from django.utils.deprecation import RemovedInDjango19Warning ImportError: cannot import name RemovedInDjango19Warning ? src git:(master) ?
我已经检查过了,我仍然在使用django 1.8.7,所以它并没有意外升级.
@MaxRah这是由Django版本中的冲突引起的.正如其他人所提到的,你将不得不删除pip uninstall django并重新安装你的首选版本:pip install django == 1.9这应该可以解决问题.