Linux:Python報錯:No module named MySQLdb

u201017971發表於2018-08-09

pip install mysql-python or pip install mysqlclient


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

相關文章