【发布时间】:2017-09-18 12:02:51
【问题描述】:
我在 OSX El Capitan 上,使用 Python 2.7 (Anaconda)。启动命令pip install MySQL-python 产生:
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/d2/gd004m2s35z5dlyz9mfn6sc40000gn/T/pip-build-FYvb_T/MySQL-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 53, in get_config
libraries = [ dequote(i[2:]) for i in libs if i.startswith(compiler_flag("l")) ]
File "setup_posix.py", line 8, in dequote
if s[0] in "\"'" and s[0] == s[-1]:
IndexError: string index out of range
这些都不起作用(退出时出现同样的错误)。
pip install mysqlclienteasy_install MySQL-python
pip 是最新的。我基本上尝试遵循相关问题中的所有建议,但没有成功。任何帮助表示赞赏,谢谢!
【问题讨论】:
标签: python mysql pip mysql-python osx-elcapitan