简体   繁体   中英

unable to install flask-mysqldb

I cant install flask-mysqldb

_mysql.c:37:20: fatal error: Python.h: No such file or directory

compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


i can't resolve

您可以尝试安装与您的python版本相对应的python-dev包:

sudo apt-get install python2.7-dev

First create path as below by running into terminal

export PATH=/usr/local/mysql/bin:$PATH

After doing this run following command to terminal

sudo pip3 install flask-mysqldb

It worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM