No module named MYSQLdb

问题描述:

报错:ImportError: No module named MySQLdb

对于不同的系统和程序有如下的解决方法:

easy_install mysql-python (mix os)

pip install mysql-python (mix os)

apt-get install python-mysqldb (Linux Ubuntu)

cd/usr/ports/databases/py-MySQLdb && make install clean (FreeBSD)

yum install MySQL-python (linux Fedora, CentOS)

pip install mysqlclient (Windows)

更多内容请参考下面的这两个链接:

http://stackoverflow.com/questions/454854/no-module-named-mysqldb

http://stackoverflow.com/questions/21440230/install-mysql-python-windows

你可能感兴趣的:(No module named MYSQLdb)