Cannot open include file: 'mysql.h': No such file or directory
来源:-15 通过pipeline保存数据到mysql - 1
蜗牛快跑__
2018-10-01

安装mysqlclient 报错如上图:
_mysql.c
_mysql.c(29): fatal error C1083: Cannot open include file: ‘mysql.h’: No such
file or directory
error: command ‘E:\VS2017\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\c
l.exe’ failed with exit status 2
Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient … error
Complete output from command e:\virtualenv\jobbole_spider_2\scripts\python.e
xe -u -c “import setuptools, tokenize;file=‘C:\Users\majun\AppData\Local
\Temp\pip-install-9jpbmln9\mysqlclient\setup.py’;f=getattr(tokenize, ‘open’,
open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code
, file, ‘exec’))” install --record C:\Users\majun\AppData\Local\Temp\pip-rec
ord-ckpc1qbx\install-record.txt --single-version-externally-managed --compile –
install-headers e:\virtualenv\jobbole_spider_2\include\site\python3.6\mysqlclien
t:
老师这个是什么问题
1回答
-
蜗牛快跑__
提问者
2018-10-01
问题已解决。方案如下,供大家参考
Cannot open include file: ‘mysql.h’ No such file or directory
解决方案
使用whl安装
1. pip install wheel
2. 前往https://www.lfd.uci.edu/~gohlke/pythonlibs/#下载mysqlclient-1.3.13-cp36-cp36m-win_amd64.whl
3. 控制台运行pip install wheel mysqlclient-1.3.13-cp36-cp36m-win_amd64.whl--------------------- 本文来自 achonor 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/acmhonor/article/details/81038793?utm_source=copy
112018-10-04
相似问题