Python 2.7 mac MySQLdb安装

时间:2013-04-27 07:25:54

标签: python macos

在终端中运行python setup.py build命令时收到以下错误。 我在这里做错了什么,我认为MySQL是在Mac OS X上预先安装好的,我是否还需要下载并安装MySQL?

sh: mysql_config: command not found
Traceback (most recent call last):
  File "setup.py", line 18, in <module>
    metadata, options = get_config()
  File "/Users/efet/Documents/workspace/kampuster/MySQL-python-1.2.4b4/setup_posix.py", line 43, in get_config
    libs = mysql_config("libs_r")
  File "/Users/efet/Documents/workspace/kampuster/MySQL-python-1.2.4b4/setup_posix.py", line 25, in mysql_config
    raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found

1 个答案:

答案 0 :(得分:-3)

您可能需要安装开发文件,在Debian mysql_config中包含libmysqlclient-dev