当前位置: 移动技术网 > IT编程>脚本编程>Python > 解决Ubuntu pip 安装 mysql-python包出错的问题

解决Ubuntu pip 安装 mysql-python包出错的问题

2018年08月19日  | 移动技术网IT编程  | 我要评论

人气最高的游戏,动漫萝莉御姐吸奶mv,安国市教育局

问题描述如下,报没有找到mysql_config环境变量

$ pip install mysql-python

collecting mysql-python==1.2.5 (from -r requirement (line 16))
 downloading mysql-python-1.2.5.zip (108kb)
100% |################################| 112kb 56kb/s 
complete output from command python setup.py egg_info:
sh: mysql_config: command not found
traceback (most recent call last):
 file "<string>", line 1, in <module>
 file "/tmp/pip-build-hveejz/mysql-python/setup.py", line 17, 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-hveejz/mysql-python/

解决:

因为相关依赖没有安装

ubuntu/debian

sudo apt-get install libmysqlclient-dev

以上这篇解决ubuntu pip 安装 mysql-python包出错的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持移动技术网。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网