MySQL-python EnvironmentError: mysql_config not found

      安装MySQL-python的时候遇到“MySQL-python EnvironmentError: mysql_config not found”。原因是我使用mac自带的mysql.

需要修改MySQL-python安装目录中的site.cfg,将mysql_config设置为mac的mysql中mysql_config路径

# The path to mysql_config.
# Only use this if mysql_config is not on your PATH, or you have some weird
# setup that requires it.
mysql_config = /usr/local/mysql/bin/mysql_config

然后重新build和install

python setup.py build
python setup.py install

 

 

posted @ 2013-10-17 23:10  tree.liang  阅读(411)  评论(0)    收藏  举报