-5

When i run pip install flask-mysql db is get this error:

_mysql.c(29) : fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory.

June7
  • 19,874
  • 8
  • 24
  • 34

2 Answers2

1

Download you version from https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python . Then just run "pip install mysqlclient-1.3.12-cp27-cp27m-win32.whl"

Alan Ortega
  • 189
  • 1
  • 2
  • 7
0

After spending a half day to search for a solution. I closed the VSCode. Started Anaconda terminal. Change directory an active environtment

(myflaskappevn):

In my case:

(myflaskappevn) D:\myflaskapp>Code .

When VSCode open, from terminal:

pip install flask_mysqldb

It worked. So I installed the following

pip install flask_mysqldb
pip install flask_mysql db 

Worked fine as well but it is not needed.

pip install Flask_WTF
pip install passlib
pip install mysql-connector-python
pip install mysql-connector

I hope that would help someone out there.

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Tin Le
  • 1
  • 1