Ubuntu pip 安装 mysql-python包出错

前端之家收集整理的这篇文章主要介绍了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

原文链接:https://www.f2er.com/ubuntu/353244.html

猜你在找的Ubuntu相关文章