Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

ERRO ao executar: pip3 install flask_mysqldb==0.2.0

julio@MBP-de-Julio jogoteca % pip3 install flask_mysqldb==0.2.0 
Collecting flask_mysqldb==0.2.0
  Using cached Flask-MySQLdb-0.2.0.tar.gz (2.1 kB)
Requirement already satisfied: Flask>=0.10 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from flask_mysqldb==0.2.0) (0.12.2)
Collecting mysqlclient
  Using cached mysqlclient-1.4.6.tar.gz (85 kB)
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/30/878zcmz11_jb7lqq9_jt2hz40000gn/T/pip-install-47jvvbk_/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/30/878zcmz11_jb7lqq9_jt2hz40000gn/T/pip-install-47jvvbk_/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/30/878zcmz11_jb7lqq9_jt2hz40000gn/T/pip-install-47jvvbk_/mysqlclient/pip-egg-info
         cwd: /private/var/folders/30/878zcmz11_jb7lqq9_jt2hz40000gn/T/pip-install-47jvvbk_/mysqlclient/
    Complete output (12 lines):
    /bin/sh: mysql_config: command not found
    /bin/sh: mariadb_config: command not found
    /bin/sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/30/878zcmz11_jb7lqq9_jt2hz40000gn/T/pip-install-47jvvbk_/mysqlclient/setup.py", line 16, in <module>
        metadata, options = get_config()
      File "/private/var/folders/30/878zcmz11_jb7lqq9_jt2hz40000gn/T/pip-install-47jvvbk_/mysqlclient/setup_posix.py", line 61, in get_config
        libs = mysql_config("libs")
      File "/private/var/folders/30/878zcmz11_jb7lqq9_jt2hz40000gn/T/pip-install-47jvvbk_/mysqlclient/setup_posix.py", line 29, in mysql_config
        raise EnvironmentError("%s not found" % (_mysql_config_path,))
    OSError: mysql_config not found
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
julio@MBP-de-Julio jogoteca %
1 resposta
solução!

Oi Júlio, tudo bem?

Perdão pela demora em lhe dar um retorno. Tente instalar estas dependências do mysqldb:

sudo apt install build-essential

Depois:

sudo apt install libmysqlclient-dev

Por fim:

pip3 install mysqlclient

Após isto, rode novamente o comando: pip3 install flask_mysqldb==0.2.0

Qualquer dúvida estou a disposição. Espero ter ajudado. Bons estudos!