CentOS下用pip安装mysql_python报错EnvironmentError:mysql_confignotfound怎么解决
本篇内容主要讲解“CentOS下用pip安装MySQL_python报错EnvironmentError: mysql_config not found怎么解决”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“CentOS下用pip安装mysql_python报错EnvironmentError: mysql_config not found怎么解决”吧!
丰泽网站制作公司哪家好,找成都创新互联公司!从网页设计、网站建设、微信开发、APP开发、成都响应式网站建设等网站项目制作,到程序开发,运营维护。成都创新互联公司于2013年创立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选成都创新互联公司。
报错提示如下:
Running setup.py egg_info for package mysql-python
sh: mysql_config: command not found
Traceback (most recent call last):
File "
File "/tmp/pip-build/mysql-python/setup.py", line 18, in
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 "
File "/tmp/pip-build/mysql-python/setup.py", line 18, in
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)
到此,相信大家对“CentOS下用pip安装mysql_python报错EnvironmentError: mysql_config not found怎么解决”有了更深的了解,不妨来实际操作一番吧!这里是创新互联网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
文章标题:CentOS下用pip安装mysql_python报错EnvironmentError:mysql_confignotfound怎么解决
本文URL:http://scyanting.com/article/jjdggs.html