安装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

猜你喜欢

转载自www.cnblogs.com/laosan007/p/11984849.html