If you already have mysqlclient
installed (i.e. you see Requirement already satisfied
) and are getting Error loading MySQLdb Module
, the following worked for me:
pip uninstall mysqlclient
export LDFLAGS="-L/usr/local/opt/openssl/lib"
and export CPPFLAGS="-I/usr/local/opt/openssl/include"
as explained herepip install mysqlclient
That reinstalls mysqlclient
and for whatever reason solved my problem.