How to Solve MYSQL Error: No module named MySQLdb

How to Solve MYSQL Error: No module named MySQLdb?

Solution

easy_install mysql-python (mix os)
pip install mysql-python (mix os/ python 2)
pip install mysqlclient (mix os/ python 3)
apt-get install python-mysqldb (Linux Ubuntu, ...)
cd /usr/ports/databases/py-MySQLdb && make install clean (FreeBSD)
yum install MySQL-python (Linux Fedora, CentOS ...)

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *