Dawn T Cherian Dawn T Cherian - 1 month ago 52
MySQL Question

Error loading MySQLdb module: libmysqlclient.so.20: cannot open shared object file: No such file or directory

I had a running django project and for some reasons I had to remove the current mysql version and install a different MySQL version in my machine.

But now when I am trying to run this program am getting an error as follows:

raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient.so.20: cannot open shared object file: No such file or directory

Answer

reinstall the c shared library:

pip uninstall mysql-python
pip install mysql-python