Reputation: 929
I am trying to create a website using Django and would like to use mySQL. Thus, with the virtualenv activated, I'm using the following command :
pip install mysqlclient
This input gives the following error :
_mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
The thing is installing it on my local python version worked like a charm ,I only face this error inside virtualenv.
I'm using python 3.7, pip and setuptools are up to date. The mysqlclient version installed locally is 1.3.13.
Upvotes: 1
Views: 5177
Reputation: 1839
You can try these things for windows 64-bit:
install using wheel
pip install wheel
download from https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
For python 3.x:
pip install mysqlclient‑1.3.13‑cp36‑cp36m‑win_amd64.whl
For python 2.7:
pip install mysqlclient‑1.3.13‑cp27‑cp27m‑win_amd64.whl
If 64 bits versions are not working you can alternatively use the 32 bits versions :
For python 3.x:
pip install mysqlclient‑1.3.13‑cp37‑cp37m‑win32.whl
For python 2.7:
pip install mysqlclient‑1.3.13‑cp27‑cp27m‑win32.whl
Upvotes: 5