ImportError: cannot import name RemovedInDjango19Warning

2024/10/6 12:21:20

I'm on Django 1.8.7 and I've just installed Django-Allauth by cloning the repo and running pip install in the app's directory in my webapp on the terminal. Now when I run manage.py migrate, I get this error:

➜src git:(master) ✗ python manage.py migrateTraceback (most recent call last):File "manage.py", line 8, in <module>from django.core.management import execute_from_command_lineFile "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 10, in <module>from django.apps import appsFile "/Library/Python/2.7/site-packages/django/apps/__init__.py", line 1, in <module>from .config import AppConfigFile "/Library/Python/2.7/site-packages/django/apps/config.py", line 6, in <module>from django.utils.module_loading import module_has_submoduleFile "/Library/Python/2.7/site-packages/django/utils/module_loading.py", line 4, in <module>from importlib import import_moduleFile "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 6, in <module>from django.utils.deprecation import RemovedInDjango19WarningImportError: cannot import name RemovedInDjango19Warning➜  src git:(master) ✗ 

enter image description here

I've checked and I'm still on django 1.8.7 so it wasn't accidently upgraded.

Answer

@MaxRah This is caused by conflicts in Django versions. As mentioned by others, you will have to remove pip uninstall django and reinstall your preferred version: pip install django==1.9 This should resolve the issue.

https://en.xdnf.cn/q/70366.html

Related Q&A

How does Yahoo Finance calculate Adjusted Close stock prices?

Heres how Yahoo Finance apparently calculates Adjusted Close stock prices:https://help.yahoo.com/kb/adjusted-close-sln28256.htmlFrom this, I understand that a constant factor is applied to the unadjust…

Celery design help: how to prevent concurrently executing tasks

Im fairly new to Celery/AMQP and am trying to come up with a task/queue/worker design to meet the following requirements.I have multiple types of "per-user" tasks: e.g., TaskA, TaskB, TaskC. …

Google App Engine - Using Search API Python with list fields

Im using ndb.Model. The Search API has the following field classes:TextField : plain textHtmlField : HTML formatted textAtomField : a string which is treated as a single tokenNumberField : a numeric v…

Handling PyMySql exceptions - Best Practices

My question regards exception best practices. Ill present my question on a specific case with PyMySQL but it regards errors handling in general. I am using PyMySQL and out of the many possible exceptio…

Beautifulsoup find element by text using `find_all` no matter if there are elements in it

For examplebs = BeautifulSoup("<html><a>sometext</a></html>") print bs.find_all("a",text=re.compile(r"some"))returns [<a>sometext</a>] …

Python: how to get values from a dictionary from pandas series

I am very new to python and trying to get value from dictionary where keys are defined in a dataframe column (pandas). I searched quite a bit and the closest thing is a question in the link below, but…

Django No Module Named URLs error

There are many similar questions posted already, but Ive already tried those solutions to no avail. Im working through a basic Django tutorial, and here is my code:urls.pyfrom django.conf.urls import …

Matplotlib artist to stay same size when zoomed in but ALSO move with panning?

This is a very direct follow-up on this question.Using matplotlib, Id like to be able to place a sort of "highlighting bar" over a range of data markers that I know will all be in a straight …

How to invoke Lambda function with Event Invocation Type via API Gateway?

Docs says:By default, the Invoke API assumes RequestResponse invocation type. You can optionally request asynchronous execution by specifying Event as the InvocationType. So all I can send to my functi…

How do I unlock the app engine database when localhost runs?

Right now I get a blank page when localhost runs, but the deployed app is fine. The logs show the "database is locked". How do I "unlock" the database for localhost?