I have a shared hosting environment on Bluehost. I am running a custom installation of python(+ django) with a few installed modules. All has been working, until yesterday a change was made on the server(I assume) which gave me this django error:
... File "/****/****/.local/lib/python/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/****/****/.local/lib/python/django/db/backends/mysql/base.py", line 14, in
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
Of course, Bluehost support is not too helpful. They advised that 1) I use the default python install, because that has MySQLdb installed already. Or that 2) I somehow import the MySQLdb package installed on the default python, from my python(dont know if this can even be done). I am concerned that if I use the default install I wont have permission to install my other packages.
Does anybody have any ideas how to get back to a working state, with as little infrastructure changes as possible?
I think you upgraded your OS installation which in turn upgraded
libmysqlclientand broke native extension. What you can do is reinstalllibmysqlclient16again (how to do it depends your particular OS) and that should fix your issue.Other approach would be to uninstall
MySQLdbmodule and reinstall it again, forcing python to compile it against a newer library.