Python安装mysqldb

1、下载安装包

  https://pypi.python.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip

2、解压缩

  unzip MySQL-python-1.2.5.zip

3、下载ez_setup.py并安装

  wget https://bootstrap.pypa.io/ez_setup.py

  python ez_setup.py

4、安装依赖包

  yum -y install mysql-devel

  yum -y install python-devel

5、进入MySQL-python目录安装

  cd MySQL-python-1.2.5/

  python setup.py build

  python setup.py install

posted @ 2017-10-02 11:28  巫谢  阅读(1203)  评论(0编辑  收藏  举报