内容简介:CentOS下用pip安装mysql_python报错EnvironmentError: mysql_config not found 如何解决
CentOS下用pip安装mysql_python报错EnvironmentError: mysql_config not found 如何解决?
报错提示如下:
Running setup.py egg_info for package mysql-python
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build/mysql-python/setup.py", line 18, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build/mysql-python/setup.py", line 18, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/mysql-python
Storing complete log in /root/.pip/pip.log
解决方法
安装mysql-devel后正常运行
yum install mysql-devel
如果手工安装mysql_python
在setup_posix.py内找到mysql_config.path
变成mysql_config.path=/xxx/xxx(mysql安装路径/bin/mysql_config)
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- ubuntu 系列安装 mysqlclient 报错解决
- 安装MySQL 8.0 遇到的问题及解决
- Python安装模块的常见问题及解决方法
- convirt2.5安装及报错解决
- golang安装遇到问题和解决,初始化beego项目
- 解决 Android Q 下应用内安装 Apk 的问题
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Hacking Growth
Sean Ellis、Morgan Brown / Crown Business / 2017-4-25 / USD 29.00
The definitive playbook by the pioneers of Growth Hacking, one of the hottest business methodologies in Silicon Valley and beyond. It seems hard to believe today, but there was a time when Airbnb w......一起来看看 《Hacking Growth》 这本书的介绍吧!