【发布时间】:2018-01-28 01:40:58
【问题描述】:
我看到了与我的类似问题的答案,但没有一个答案对我有帮助。 我仍然有同样的问题。如果重复,我很抱歉,但其他答案对我没有帮助。
我被 Django 中的一个项目困住了,我必须在其中安装 MySQL-python。
当我运行pip install MySQL-Python 时出现此错误:
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-Ue6URf/MySQL-Python/
我按照这里的一些答案中的建议使用了 brew,但根本没有帮助。 我正在使用带有最后一个 Python3 和最后一个 Django 版本的 Mac 机器。 我有 MampPro 最后一个版本,我正在使用 MySQL 服务。
我正在分享安装的整个输出:
Collecting MySQL-Python
Downloading MySQL-python-1.2.5.zip (108kB)
100% |################################| 112kB 561kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-Ue6URf/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
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-Ue6URf/MySQL-Python/
【问题讨论】:
-
我看到了这个问题,但这并不能解决我的问题我仍然有同样的问题