centos 下安装MySQL-python

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

安装MysqL-python模块

yuminstallMysqL-python-y


先安装 setuptools

wgethttp://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#解压后
pythonsetup.pybuild
pythonsetup.pyinstall


安装一些扩展库

yum-yinstallrpm-buildgcc-c++MysqL-develpython-devel


安装MysqL-python

wgethttp://download.sourceforge.net/sourceforge/MysqL-python/MysqL-python-1.2.3.tar.gz
解压进入安装目录。
编辑site.cfg,把MysqL_config那一行取消注释,并改为:
MysqL_config=/usr/lib64/MysqL/MysqL_config(根据自己MysqL安装位置定义)

pythonsetup.pybuild
pythonsetup.pyinstall


测试安装

python

>>>importMysqLdb
原文链接:https://www.f2er.com/centos/382037.html

猜你在找的CentOS相关文章