无法安装mysql-python

时间:2011-12-28 19:38:01

标签: python mysql macos osx-lion

我已下载MySQL-python-1.2.3.tar.gz,解压缩并解压缩,并运行sudo python setup.py build。我收到这个错误:

Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    metadata, options = get_config()
  File "/Users/me/sources/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config
    libs = mysql_config("libs_r")
  File "/Users/me/sources/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
    raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found

find / -name mysql_config的计算机上搜索mysql_config时发现没有匹配项。我使用的是Mac OS X 10.7.2,安装了Python 2.7.1。

1 个答案:

答案 0 :(得分:3)

看起来你要安装的东西只是Python的MySQL API。您应首先在系统上install使用MySQL,然后再使用此库。