"Error loading MySQLdb module Reason: image not found" error fix in El Capitan Mac OS

07 Oct · by Tim Kamanin · 1 min read

If you use mysql database in your Django project and when you run runserver command and get an error message similar to this: " Error loading MySQLdb module Reason: image not found" that means your El Capitan struggles to find necessary libraries.

The issue can be fixed with these two symlinks, just run following commands in your terminal and you're set:

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/local/lib/libmysqlclient.18.dylib
sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql

Comments

Required for comment verification