PATH="/usr/local/mysql/bin:${PATH}" export PATH export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/ export VERSIONER_PYTHON_PREFER_64_BIT=no export VERSIONER_PYTHON_PREFER_32_BIT=yes
参考文档:http://www.cnblogs.com/ifantastic/archive/2013/04/13/3017677.html
ubuntu下安装sudo pip install MySQL-python报同上面一样的错误解决方法:
1、sudo apt-get install python-setuptools
2、sudo apt-get install libmysqld-dev
3、sudo apt-get install libmysqlclient-dev
4、sudo apt-get install python-dev
sudo pip install MySQL-python