安装flask_mysqldb出现报错问题解析

安装 mysqldb (pip3 install Flask-MySQLdb)报错 EnvironmentError: mysql_config not found ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

或者出现 error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

 

解决方案:

参考Github上的答案(https://github.com/scrapy/scrapy/issues/2115#issuecomment-231849637),成功解决。

with Python 3, you'll need

sudo apt-get install python3 python-dev python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev python3-pip

with Python 2, you'll need

sudo apt-get install python-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev python-pip

 

posted @ 2019-12-04 19:11  老三的博客  阅读(494)  评论(0编辑  收藏  举报