zoukankan      html  css  js  c++  java
  • python3.8安装mysqlclient 报错

    报错信息

        ERROR: Command errored out with exit status 1:
         command: /home/rock/.virtualenvs/tornado_test/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qign49wo/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qign49wo/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
    '"'"', '"'"'
    '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-vo7n02y3
             cwd: /tmp/pip-install-qign49wo/mysqlclient/
        Complete output (12 lines):
        /bin/sh: 1: mysql_config: not found
        /bin/sh: 1: mariadb_config: not found
        /bin/sh: 1: mysql_config: not found
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-qign49wo/mysqlclient/setup.py", line 15, in <module>
            metadata, options = get_config()
          File "/tmp/pip-install-qign49wo/mysqlclient/setup_posix.py", line 65, in get_config
            libs = mysql_config("libs")
          File "/tmp/pip-install-qign49wo/mysqlclient/setup_posix.py", line 31, in mysql_config
            raise OSError("{} not found".format(_mysql_config_path))
        OSError: mysql_config not found
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    

    解决办法

    sudo apt install -y mysql-client
    sudo apt-get install libmysqlclient-dev 
    sudo apt install libssl-dev 
    sudo apt install libcrypto++-dev 
    
    pip3 install mysqlclient
    

  • 相关阅读:
    Golang 版本 支付宝支付SDK app支付接口2.0
    用 Certbot-auto 在 letsencrypt.org申请免费 SSL 证书实现 HTTPS
    Go类型断言demo
    签名算法
    golang cron定时任务简单实现
    Chapter Zero 0.2.2 内存
    Linux-系统目录结构
    Linux-关于Bash
    Chapter Zero 0.2.1 执行运算与判断的CPU
    Chapter Zero 0.1.4 计算机上常用的计算单位
  • 原文地址:https://www.cnblogs.com/chen55555/p/13749961.html
Copyright © 2011-2022 走看看