[Answered ]-No module named '_mysql_connector' using Django and mysql-connector-python 8.0.32

1👍

Same issue here running Django 3.2-4.1 in Docker, on a Mac M1: "No module named ‘_mysql_connector’"

mysql-connector-python==8.0.31 and below runs correctly on all systems (native and Docker).

mysql-connector-python==8.0.32 runs correctly in Docker under Win10, and deploys successfully on our native Ubuntu servers. Only the Mac M1 generates the error.

The Win10 Docker container initializes with MySQL Docker Image 8.0.31-1.2.10-server, whereas the same Docker container on the Mac M1 shows "MySQL Docker Image 8.0.32-1.2.11-server".

Sorry these are just clues, but this seems like another M1 dependency issue.

0👍

I was experiencing this issue with Django 4.2.6 and mysql-connector-python 8.1.0. The issue was resolved by downgrading to mysql-connector-python 8.0.31

Leave a comment