简体   繁体   中英

Trouble installing mysql-python

I downloaded MySQL-python-1.2.3.tar.gz , unzipped and untarred it, and ran sudo python setup.py build . I get this error:

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

A search for mysql_config on my computer with find / -name mysql_config found no matches. I'm Using Mac OS X 10.7.2, with Python 2.7.1 installed.

Looks like what you're trying to install is just a MySQL API for Python. You should install MySQL on your system first and then this library.

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