简体   繁体   中英

Python 2.7 mac MySQLdb installation

I receive the following error when I run python setup.py build command in the terminal. What am I doing wrong here, I thought MySQL was pre-insalled on Mac OS X, do I also need to download and install 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

您可能需要在Debian mysql_config软件包libmysqlclient-dev安装开发文件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM