Installation flask_mysqldb error occurs resolve problems

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

Or there is error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

 

solution:

The answer on the reference Github (https://github.com/scrapy/scrapy/issues/2115#issuecomment-231849637), successfully resolved.

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

 

Guess you like

Origin www.cnblogs.com/laosan007/p/11984849.html