解决Ubuntu pip 安装 mysql-python包出错的问题
更新时间:2018年06月11日 09:42:21 作者:Tab609
今天小编就为大家分享一篇解决Ubuntu pip 安装 mysql-python包出错的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
问题描述如下,报没有找到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包出错的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
pycharm中导入模块错误时提示Try to run this command from the system ter
这篇文章主要介绍了pycharm中导入模块错误时提示Try to run this command from the system terminal问题,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下2020-03-03Anaconda+Pycharm+Pytorch虚拟环境创建(各种包安装保姆级教学)
相信很多时候大家都会用到虚拟环境,他具有可以让你快速切换不同的python版本,本文主要介绍了Anaconda+Pycharm+Pytorch虚拟环境创建,具有一定的参考价值,感兴趣的小伙伴们可以参考一下2021-10-10Python 使用 Pillow 模块给图片添加文字水印的方法
这篇文章主要介绍了Python 使用 Pillow 模块给图片添加文字水印的方法,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下2019-08-08
最新评论