铁雪资源网 Design By www.gsvan.com

问题描述如下,报没有找到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包出错的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

标签:
pip,安装mysql,python

铁雪资源网 Design By www.gsvan.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
铁雪资源网 Design By www.gsvan.com

评论“解决Ubuntu pip 安装 mysql-python包出错的问题”

暂无解决Ubuntu pip 安装 mysql-python包出错的问题的评论...