Ubuntu python安裝MySQL API

指令安裝

sudo apt-get install linuxbrew-wrapper

brew install mysql-connector-c


pip install mysqlclient


如果之後有遇到EnvironmentError: mysql_config not found

另外安裝
sudo apt-get install libmysqlclient-dev
sudo apt-get install python-dev

之後就能順利執行囉

參考 reference:



留言

熱門文章