我正试图在Cygwin上安装MySQLdb for python。不幸的是,当我运行python setup.py build时,会出现以下错误:$ python setup.py build
/bin/sh: /usr/local/bin/mysql_config: No such file or directory
Traceback (most recent call last):
File "setup.py", line 16, in
metadata, options = get_config()
File "/home/Ben/python/MySQL-python-1.2.2/setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "/home/Ben/python/MySQL-python-1.2.2/setup_posix.py", line 24, in mysql_config
raise EnvironmentError, "%s not found" % mysql_config.path
EnvironmentError: /usr/local/bin/mysql_config not found
很明显我没有安装mysql_config,我想这就是问题所在。MySQLdb的自述文件中提到了这一点,但它没有解释如何绕过它或如何安装mysql_config。
所以这可能很简单:如何为Cygwin安装mysql_config?
或者比这更难。
仅供参考:我有python 2.5.2和MySQL 5.1.30,在Cygwin下运行。