开发者社区> 问答> 正文

mac安装mysql-python报错?报错

使用命令  sudo  pip install mysql-python  安装mysql-python 时报错

Collecting mysql-python

  Downloading MySQL-python-1.2.5.zip (108kB)

    100% |████████████████████████████████| 112kB 736kB/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-kxDfNm/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-kxDfNm/mysql-python/

展开
收起
爱吃鱼的程序员 2020-06-08 14:13:46 661 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    我也遇到了相同的问题,请问你解决了吗?

     

    回复 @ddzhang:解决了先装一下brew然后brewinstallmysql然后就可以了
    2020-06-08 14:14:06
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载