MySQL-python 的安装

1.python版本:

[root@t6 MySQL-python-1.2.2]# python -V

Python 2.6.6

2.确定mysql的安装目录

3.下载MySQL-python

 http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.2/MySQL-python-1.2.2.tar.gz/download

4.安装:

[root@t6 Django]# tar xvzf MySQL-python-1.2.2.tar.gz

[root@t6 Django]# cd MySQL-python-1.2.2

编辑site.cfg

mysql_config = /usr/local/mysql/bin/mysql_config 这一行#去掉,然后修改mysql的安装目录

mysql_config = /application/mysql/bin/mysql_config

5.python setup.py build

python setup.py install

按装完成

可能出现的错误:

error: command 'gcc' failed with exit status 1

解决:

yum install python-devel -y  

你可能感兴趣的:(mysql,python,安装)