0

I installed Django correctly in a folder in Windows 10 Home and I need to connect this app with Mysql. When I execute pip install mysqlclient or/and mysql-python I have this error.

_mysql.c
_mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

----------------------------------------
Command "c:\xampp\htdocs\worldfeeding\env\scripts\python.exe -u -c "import 
setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-ceju8r0r\\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\user\AppData\Local\Temp\pip-record-r4bwaq6w\install-record.txt --single-version-externally-managed --compile --install-headers c:\xampp\htdocs\worldfeeding\env\include\site\python3.7\mysqlclient" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-install-ceju8r0r\mysqlclient\

Searching, I tried the solutions from the answers in:

error: command 'C:\\ Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

Python pip install error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

But not working.

So, I installed paquets from Visual Studio Community 2017, following the instructions from the answer in those links and not working.

I installed mysql-web-community, with mysql server.

I download VS and Twisted-18.4.0-cp36-cp36m-win32.whl but not working.

I tryed with npm install --global --production windows-build-tools and nothing.

Can somebody help me?

Miguel Herreros Cejas
  • 664
  • 1
  • 12
  • 28

0 Answers0