Skip to content Skip to main navigation Skip to footer

python 中mysql_config not found 错误的解决办法

在python中安装MySQL_python。不想通过下载源码编译,而是想用

easy_install MySQL_python
 

来安装。结果一直报错:

mysql_config not found
 

网上很多资料说要通过修改site.cfg来指定mysql_config的位置。我想只是因为我的macos里的mysql没有安装到系统默认位置导致的。考虑到系统会到/usr/bin找mysql,那自然也会去这里找mysql_config。于是安装语句变成了:

easy_install MySQL-python --with-mysql_config=/usr/local/mysql-5.6.20-osx10.8-x86_64/bin/mysql_config
 

就通过了。

0 Comments

There are no comments yet

Leave a comment

Your email address will not be published.