search

Home  >  Q&A  >  body text

Install python_MySQLdb on mac

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

PHP中文网PHP中文网2774 days ago829

reply all(3)I'll reply

  • 漂亮男人

    漂亮男人2017-05-24 11:37:24

    First you need to install the mysql development library file, a package like libmysqld-dev

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-24 11:37:24

    Use pymysql. I use pymysql on mac. It is easy to install and easy to use.

    reply
    0
  • PHP中文网

    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)

    reply
    0
  • Cancelreply