您好,登录后才能下订单哦!
本篇内容主要讲解“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)
到此,相信大家对“CentOS下用pip安装mysql_python报错EnvironmentError: mysql_config not found怎么解决”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。