I'm running MySQLdb v1.2.3 and getting the following error:
LookupError: unknown encoding: utf8mb4
This answer suggests updating MySQLdb to version 1.2.5. I updated and am now getting this error:
ImportError: this is MySQLdb version (1, 2, 5, 'final', 1), but _mysql is version (1, 2, 3, 'final', 0)
I'm not sure how to go about updating _mysql
or how this will change my setup. Is this just a python module or is it connected in some way to my MySQL server?
EDIT: I've tried running the following three methods:
sudo pip uninstall mysql-python
sudo pip install mysql-python
sudo pip uninstall mysql-python
sudo pip install mysql-python==1.2.5
sudo pip install mysql-python --upgrade
When uninstalling I get
/usr/local/lib/python2.7/dist-packages/_mysql.so
/usr/local/lib/python2.7/dist-packages/_mysql_exceptions.py
/usr/local/lib/python2.7/dist-packages/_mysql_exceptions.pyc
Proceed (y/n)? y
Successfully uninstalled MySQL-python-1.2.3
After that I am unable to import either MySQLdb
or _mysql
but reinstalling always gives me _mysql
version 1.2.3.