0
我下載了MySQL-python-1.2.3.tar.gz
,解壓縮並解壓縮它,然後運行sudo python setup.py build
。我得到這個錯誤:安裝mysql-python時遇到的麻煩
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。
你的機器上安裝了MySQL嗎?看起來你想要安裝的只是Python的MySQL API。 – 2011-12-28 19:59:47
啊,有道理。我認爲mysql-python也會安裝python。你能張貼你說的答案嗎?我可以標記它嗎? – babonk 2011-12-28 20:04:26
我真的推薦使用'easy_install'來安裝Python模塊。隨OS X發貨,你可以簡單地使用'easy_install MySQL-python' – 2011-12-28 20:05:39