[Fixed]-Django ImportError: cannot import name 'python_2_unicode_compatible'

17👍

You are using Django 3, where all the Python 2 compatibility APIs that used to be bundled with Django were removed. django-messages still depends on these, and is trying and failing to import them.

You either need to downgrade to Django 2.2, or wait for django-messages to be updated for Django 3 support.

This applies for any library in which you get such errors – it means the library is not compatible yet with Django 3.

Leave a comment