1.下載Python的MySQL支持庫地址:http://sourceforge.net/projects/mysql-python/2.解壓編譯pythonsetup.pyinstall遇到第一個問題:_mysql.c:44:23:error:my_config.h:Nosuchfileordirectory解決辦法,編輯setup_posix.py文件,將mysql_config.path設置成你安裝的mysql的目錄,比如/usr/local/mysql/bin/mysql_config3.在python中"importMySQLdb",遇到問題:ImportError:libmysqlclient_r.so.16:cannotopensharedobjectfile:Nosuchfileordirectory解決辦法,編輯/etc/ld.so.conf.d/mysql-i386.conf文件改成正確的mysql安裝地址,比如我的:usr/local/mysql/lib/mysql存盤后退出,執行ldconfig
網站導航
- zblogPHP模板zbpkf
- zblog免費模板zblogfree
- zblog模板學習zblogxuexi
- zblogPHP仿站zbpfang