EnvironmentError: mysql_config not found
生活随笔
收集整理的這篇文章主要介紹了
EnvironmentError: mysql_config not found
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
安裝mysql相關的python包時,都有可能出現以下錯誤:
? pip install flask-mysqldb Collecting flask-mysqldbDownloading Flask-MySQLdb-0.2.0.tar.gz Requirement already satisfied: Flask>=0.10 in /usr/local/lib/python2.7/site-packages (from flask-mysqldb) Collecting mysqlclient (from flask-mysqldb)Downloading mysqlclient-1.3.12.tar.gz (89kB)100% |████████████████████████████████| 92kB 507kB/sComplete output from command python setup.py egg_info:sh: mysql_config: command not foundTraceback (most recent call last):File "<string>", line 1, in <module>File "/private/var/folders/5n/zslcp_dd2gj1wq7xrhbj0s_c0000gn/T/pip-build-klGKDy/mysqlclient/setup.py", line 17, in <module>metadata, options = get_config()File "setup_posix.py", line 44, in get_configlibs = mysql_config("libs_r")File "setup_posix.py", line 26, in mysql_configraise EnvironmentError("%s not found" % (mysql_config.path,))EnvironmentError: mysql_config not foundFor MacOS 最快的臨時解決方法:
export PATH=$PATH:/usr/local/mysql/binFor CentOS
yum install python-devel mysql-develFor Ubuntu
sudo apt-get install python-dev sudo apt-get install python-MySQLdb?
總結
以上是生活随笔為你收集整理的EnvironmentError: mysql_config not found的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: USACO-Section2.3 Lon
- 下一篇: 第四周作业wcPro