我尝试安装mysql,出现此错误“错误:命令错误,退出状态为1:...”

时间:2020-05-16 05:54:50

标签: python mysql linux pip python-3.8

我尝试安装mysql软件包,但出现此错误(也适用于其他软件包)。 (Python 3.8.2)on pop-os

$ pip3 install mysql
collecting mysql


Using cached mysql-0.0.2.tar.gz (1.9 kB)

Collecting mysqlclient



 Using cached mysqlclient-1.4.6.tar.gz (85 kB)
ERROR: Command errored out with exit status 1:
 command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5tw6qsqw/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5tw6qsqw/mysqlclient/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-install-5tw6qsqw/mysqlclient/pip-egg-info
     cwd: /tmp/pip-install-5tw6qsqw/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-5tw6qsqw/mysqlclient/setup.py", line 16, in <module>
    metadata, options = get_config()
  File "/tmp/pip-install-5tw6qsqw/mysqlclient/setup_posix.py", line 61, in get_config
    libs = mysql_config("libs")
  File "/tmp/pip-install-5tw6qsqw/mysqlclient/setup_posix.py", line 29, in mysql_config
    raise EnvironmentError("%s not found" % (_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.

请提出任何解决方案

0 个答案:

没有答案
相关问题