美文网首页
Ubuntu18 下 pip install mysqlclie

Ubuntu18 下 pip install mysqlclie

作者: 夏山闻汐 | 来源:发表于2018-08-14 11:23 被阅读181次

    今天安装mysqlclient 折腾了会,记录一下,希望可以帮助到遇到相同问题的朋友。

    环境:Python 3.6

    1. 首先遇到的报错: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ezfej8h3/mysqlclient/

    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ezfej8h3/mysqlclient/

    解决方案:
    安装 python3.6-dev, libmysqlclient-dev:

    sudo apt-get install python3.6-dev libmysqlclient-dev
    
    1. 然后又会报如下的错误:


      Failed building wheel for mysqlclient

    Failed building wheel for mysqlclient

    解决方案,来个全家桶:

    sudo apt-get install python3 python-dev python3-dev \  build-essential libssl-dev libffi-dev \ libxml2-dev libxslt1-dev zlib1g-dev \ python-pip
    

    安装成功:


    Success

    ps:如果您有好的建议,欢迎交流 :-D,也欢迎访问我的个人博客:tundrazone.com

    相关文章

      网友评论

          本文标题:Ubuntu18 下 pip install mysqlclie

          本文链接:https://www.haomeiwen.com/subject/novmbftx.html