centos 7 安装mysql-python

前端之家收集整理的这篇文章主要介绍了centos 7 安装mysql-python前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1.首先要先下载,MysqLdb下载地址:

https://pypi.python.org/pypi/MysqL-python/1.2.5


2. unzip MysqL-python-1.2.5;

3. cd MysqL-python-1.2.5;

python setup.py install;

此时报错:

Traceback (most recent call last):
File "setup.py",line 17,in <module>
Metadata,options = get_config()
File "/root/MysqL-python-1.2.5/setup_posix.py",line 43,in get_config
libs = MysqL_config("libs_r")
File "/root/MysqL-python-1.2.5/setup_posix.py",line 25,in MysqL_config
raise EnvironmentError("%s not found" % (MysqL_config.path,))
EnvironmentError: MysqL_config not found

原因是没有安装MysqL-devel;

yum install MysqL-devel;


4.重新运行python setup.py install

原文链接:https://www.f2er.com/centos/378251.html

猜你在找的CentOS相关文章