Error loading MySQLdb module. - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: Error loading MySQLdb module. (/thread-13889.html) |
Error loading MySQLdb module. - pythonsmurf - Nov-05-2018 Hi all, Apologies, i am new to python and django, this might be a simple question. I *had* a perfectly working environment using Django and MySQL 8. The Python components were installed via pip3. From pip3 freeze: Django==2.1.3 django-filter==2.0.0 django-formtools==2.1 django-widget-tweaks==1.4.2 mysqlclient==1.3.13My imac recently updated to Mojave, and the whole thing fell apart and issues connecting to MySQL came up. this is the output from python3 manage.py makemigrations [i] So, i have now tried:Uninstalling and Reinstalling MySQL Uninstalling and Reinstalling mysqlclient (via pip) Uninstalling and Reinstalling Django and components (via pip) i read somewhere that @rpath points to /usr/lib, i have no symbolic link in /usr/lib pointing to /usr/local/mysql/lib where libmysqlclient.21.dylib resides? Maybe thats something to do with it? No matter what I do, I cant get my environment back up and running again. all the things suggested on google that I have found havent worked. Has anyone come across this? Many thanks! RE: Error loading MySQLdb module. - bishwasbh - Feb-04-2021 This error may pop up due to lack of dependencies and libraries. Follow these steps before pip install mysqlclient .For Debian / Ubuntu Quote:sudo apt-get install python3-dev default-libmysqlclient-dev build-essentialIf this didn't worked try checking this Solution for Django MySQLClient pip compile failure on Linux |