Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Deus me ajude.

Requirement already satisfied: Werkzeug>=0.7 in c:\users\vinicius\appdata\local\programs\python\python37\lib\site-packages (from Flask>=0.10->flask_mysqldb==0.2.0) (0.15.5)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\vinicius\appdata\local\programs\python\python37\lib\site-packages (from Jinja2>=2.4->Flask>=0.10->flask_mysqldb==0.2.0) (1.1.1)
Installing collected packages: mysqlclient, flask-mysqldb
  Running setup.py install for mysqlclient ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\vinicius\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\vinicius\\AppData\\Local\\Temp\\pip-install-2pw6c39e\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\vinici
us\\AppData\\Local\\Temp\\pip-install-2pw6c39e\\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\vinic
ius\AppData\Local\Temp\pip-record-gvwnjg2e\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\vinicius\AppData\Local\Temp\pip-install-2pw6c39e\mysqlclient\
    Complete output (30 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\MySQLdb
    copying MySQLdb\__init__.py -> build\lib.win-amd64-3.7\MySQLdb
    copying MySQLdb\_exceptions.py -> build\lib.win-amd64-3.7\MySQLdb
    copying MySQLdb\compat.py -> build\lib.win-amd64-3.7\MySQLdb
    copying MySQLdb\connections.py -> build\lib.win-amd64-3.7\MySQLdb
    copying MySQLdb\converters.py -> build\lib.win-amd64-3.7\MySQLdb
    copying MySQLdb\cursors.py -> build\lib.win-amd64-3.7\MySQLdb
    copying MySQLdb\release.py -> build\lib.win-amd64-3.7\MySQLdb
    copying MySQLdb\times.py -> build\lib.win-amd64-3.7\MySQLdb
    creating build\lib.win-amd64-3.7\MySQLdb\constants
    copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.7\MySQLdb\constants
    copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.7\MySQLdb\constants
    copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.7\MySQLdb\constants
    copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.7\MySQLdb\constants
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.7\MySQLdb\constants
    copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.7\MySQLdb\constants
    running build_ext
    building 'MySQLdb._mysql' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\MySQLdb
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,4,4,'final',0) -D__version__=1.4.4 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include\ma
riadb" -Ic:\users\vinicius\appdata\local\programs\python\python37\include -Ic:\users\vinicius\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\W
indows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program File
s (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /TcMySQLdb/_mysql.c /Fobuild\temp.win-amd64-3.7\Release\MySQLdb/_mysql.obj /Zl /D_CRT_SECURE_NO_WARNINGS
    _mysql.c
    MySQLdb/_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\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\vinicius\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\vinicius\\AppData\\Local\\Temp\\pip-install-2pw6c39e\\mysqlclient\\setup.py'"'"'
; __file__='"'"'C:\\Users\\vinicius\\AppData\\Local\\Temp\\pip-install-2pw6c39e\\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\vinicius\AppData\Local\Temp\pip-record-gvwnjg2e\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
3 respostas

Oi Vinicius, tudo bom?

Da uma olhada nesse tópico aqui:

https://cursos.alura.com.br/forum/topico-problemas-com-a-instalacao-do-mysqlclient-django-67713

Que é muito parecido com o seu, porém rolou com alguém que estava usando o Django =)

Parece que ta faltando instalar o mysqlclient no seu ambiente.

Abraço

solução!

Comigo funcionou com isso py -3.7 -m pip install mysqlclient-1.4.4-cp37-cp37m-win_amd64.whl

Entrei pela linha de comando cmd, até o a pasta que o arquivo mysqlclient-1.4.4-cp37-cp37m-win_amd64.whl estava, depois executei essa linha de código acima. Então executei o pip3 install flask_mysqldb==0.2.0 ai sim funcionou.

Boa Vinicius! Fico feliz que tenha resolvido =)

Vou marcar como solução aqui, qualquer problema é só abrir um novo tópico

Abraço