linux下mysqldb的安裝for python27

1.

 1. http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz  下載MySQL-python-1.2.3.tar.gz java

2.若是有安裝過mysql,能夠忽略,沒有多話,能夠安裝mysql apt-get install myslq-serverpython

也能夠安裝apt-get install libmysqld-devmysql

3.配置mysql-python/1.2.3中的site.cfg   mysql_config=/usr/bin/mysql_config(實際路徑)linux

4.python setup.py build   python setup.py installsql

5.若是有Python.h No such file or directory異常,安裝apt-get install python-devubuntu

6.find / -name mysql_config 查找mysql_config路徑並替換到site.cfg測試

本方法只在linux ubuntu中測試經過ui

相關文章
相關標籤/搜索