如何解决pip3.7 install mysqlclient == 1.3.13失败,出现EnvironmentError:找不到mysql_config
在安装MySQL客户端时,我在centos7计算机上收到错误消息。 对于命令,pip3.7 install mysqlclient == 1.3.13。尝试根据一些建议解决问题,我尝试了yum install -y mysql-devel,即使我遇到错误也可以有人帮助我哪里出错了。
执行pip3.7 install mysqlclient == 1.3.13时出错
command: /usr/local/bin/python3.7 -c 'import sys,setuptools,tokenize; sys .argv[0] = '"'"'/tmp/pip-install-50arat2r/mysqlclient/setup.py'"'"'; __file__='" '"'/tmp/pip-install-50arat2r/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-pip-egg-info-_n2uh5pv
cwd: /tmp/pip-install-50arat2r/mysqlclient/
Complete output (10 lines):
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>",line 1,in <module>
File "/tmp/pip-install-50arat2r/mysqlclient/setup.py",line 18,in <module >
metadata,options = get_config()
File "/tmp/pip-install-50arat2r/mysqlclient/setup_posix.py",line 53,in g et_config
libs = mysql_config("libs_r")
File "/tmp/pip-install-50arat2r/mysqlclient/setup_posix.py",line 28,in m ysql_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
执行yum install -y mysql-devel时出错
Resolving Dependencies
--> Running transaction check
---> Package mariadb-devel.x86_64 1:5.5.65-1.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.65-1.el7 for package: 1:mariadb-devel-5.5.65-1.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.65-1.el7 will be installed
Removing mariadb-libs.x86_64 1:5.5.65-1.el7 - u due to obsoletes from installed mysql-community-libs-8.0.22-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.65-1.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.65-1.el7 for package: 1:mariadb-devel-5.5.65-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: 1:mariadb-devel-5.5.65-1.el7.x86_64 (base)
Requires: mariadb-libs(x86-64) = 1:5.5.65-1.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。