pip3 install mysqlclient 报错 Command “python setup.py egg_info” failed with error
鉴于文章被盗:被盗网址:http://smartadmin.com.cn/smartadmin/show-13216.html
特此声明:源文链接:https://blog.csdn.net/weixin_44331765/article/details/120242211
源文链接
1. 软件描述
- centos 8.0
- python3.6
- 鉴于文章被盗:被盗网址:http://smartadmin.com.cn/smartadmin/show-13216.html
特此声明:源文链接:https://blog.csdn.net/weixin_44331765/article/details/120242211
2. 问题描述
使用命令
pip3 install mysqlclient
报错
[root@z ~]# pip3 install mysqlclient
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: 未找到命令
/bin/sh: mariadb_config: 未找到命令
/bin/sh: mysql_config: 未找到命令
mysql_config --version
mariadb_config --version
mysql_config --libs
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-8k22usrq/mysqlclient/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-build-8k22usrq/mysqlclient/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-build-8k22usrq/mysqlclient/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8k22usrq/mysqlclient/
3. 解决方法
yum install python3-devel mysql-devel
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/119282.html