Monday, February 13, 2017

安装mysqldb

##centos 环境
sudo yum install mysql-devel
sudo pip install mysql-python


##ubuntu环境
Starting with a vanilla Lucid install [1], install pip and upgrade to the latest version:
apt-get install python-pip
pip install -U pip
Next, install the required development packages:
apt-get install python-dev libmysqlclient-dev
then
pip install MySQL-python
should complete successfully.


mac下安装
$ brew uninstall mysql
$ brew install mysql-connector-c
$ brew unlink mysql-connector-c
$ brew install mysql
$ pip install mysql-python

No comments:

Post a Comment