Pythonmysql-python安裝Python2.7

雲翹楚發表於2017-02-28

mac安裝sudo pip install MySQL-python報錯EnvironmentError: mysql_config not found解決方法

1
2
3
4
5
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


相關文章