662   MySQL Python

加入没有安装Python链接MySQL的包,会报以下错误

No module named MySQLdb

根据不同操作系统和环境安装

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




Leave a Reply

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