1
resposta

Erro ao instalar o mysqlclient e o flask_mysql

  Failed building wheel for mysqlclient
 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,3,14,'final',0) -
D__version__=1.3.14 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -Ic:\users\ti\appdata\local\programs\python\python37-32\include -Ic:\users\ti\appdata\local\programs\py
thon\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017
\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include
\10.0.17763.0\cppwinrt" /Tc_mysql.c /Fobuild\temp.win32-3.7\Release\_mysql.obj /Zl
    _mysql.c
    _mysql.c(29): fatal error C1083: NÆo ‚ poss¡vel abrir arquivo incluir: '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:\users\ti\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\TI\\AppData\\Local\\Temp\\pip-install-mytosqcg\\mysqlcli
ent\\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\TI\AppData\Local
\Temp\pip-record-uk7p0kda\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\TI\AppData\Local\Temp\pip-install-mytosqcg\mysqlclient\
1 resposta

Olá Felipe,

Não sei se o problema é só por conta do build do mysqlclient. Mas tente executar o comando:

pip.exe install -U wheel