System: mac OS 10.12.1
python 2.7.10
Using pip and SourceForge to download and install two methods to install python_MySQLdb, both error reports
Error: EnvironmentError: mysql_config not found
Follow http:/ /blog.csdn.net/janroneh... The modification did not solve the problem and still reported the same error
漂亮男人2017-05-24 11:37:24
First you need to install the mysql development library file, a package like libmysqld-dev
習慣沉默2017-05-24 11:37:24
Use pymysql. I use pymysql on mac. It is easy to install and easy to use.
PHP中文网2017-05-24 11:37:24
brew install mysql
pip install mysqlclient
or pip install MySQL-Python
(Note: mysqlclient is a branch of python mysqldb, already supports python3, and the MySQLdb interface is the same)