首页 > 代码库 > Python-mysql模块安装

Python-mysql模块安装


wget http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz
tar zxvf MySQL-python-1.2.3.tar.gz
$ cd MySQL-python-1.2.3
$ python setup.py build
$ python setup.py install

如果出现错误
【centos】 error: command ‘gcc‘ failed with exit status 1
安装
yum install gcc libffi-devel python-devel openssl-devel

然后再执行一遍,搞定

Python-mysql模块安装