繁体   English   中英

安装 MYSQLCLIENT python Linux 时出错

[英]Error to install MYSQLCLIENT python Linux

我试图在 linux 上安装 mysqlclient,并在下面不断收到此错误。

我已经尝试更新:

sudo apt-get install build-essential sudo apt-get install libssl-dev

并且错误仍然存在:

^C(venv) pip install mysqlclient
Collecting mysqlclient
  Using cached mysqlclient-2.0.2.tar.gz (88 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/felipecid/PycharmProjects/djangoAgenda/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-1wsevah8
         cwd: /tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/
    Complete output (12 lines):
    /bin/sh: mysql_config: comando não encontrado
    /bin/sh: mariadb_config: comando não encontrado
    /bin/sh: mysql_config: comando não encontrado
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/setup.py", line 15, in <module>
        metadata, options = get_config()
      File "/tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/setup_posix.py", line 65, in get_config
        libs = mysql_config("libs")
      File "/tmp/pip-install-ct6grj28/mysqlclient_e1f80e76b30f4edaaa24bdcfc6a54e18/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.

问题是因为我使用的是 DISTR Linux Mint 版本,只需使用常规 Unbuntu 版本即可!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM