Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

whats does assert _sre.MAGIC == MAGIC, SRE module mismatch AssertionError: SRE module mismatch error mean?

Hello I´m trying to run a python manage.py runserver command but getting this error message

File "C:\Users\adrie\Anaconda3\lib\sre_compile.py", line 17, in assert _sre.MAGIC == MAGIC, "SRE module mismatch" AssertionError: SRE module mismatch

Does anyone have idea of what´s happening here?

I had anaconda installed previously and was running fine. But then I´ve deinstalled and reinstalled anaconda, and I´m getting this error now.

like image 296
Adriel Werlich Avatar asked Dec 03 '18 19:12

Adriel Werlich


3 Answers

Make sure you do not have any mismatch between Python interpreter version used (like 3.7) and the 're' python module (like 3.6.1).

like image 143
Phil Avatar answered Oct 18 '22 00:10

Phil


You need reinstall IDLE or anaconda

like image 20
Александр Мангир Avatar answered Oct 18 '22 00:10

Александр Мангир


My PYTHONHOME and PYTHONPATH environment variables were pointing to the wrong version. By fixing this import sre_compile was fixed.

like image 1
Marvin Effing Avatar answered Oct 17 '22 23:10

Marvin Effing