Ошибка при установке: pip install mysqlclient - PullRequest
0 голосов
/ 19 июня 2020

Я получаю эту ошибку, когда делаю pip install mysqlclient

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Вот полный вывод ошибки:

Collecting mysqlclient
  Using cached mysqlclient-1.4.6.tar.gz (85 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/dennis/opt/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/z0/8lrh7p551kl3tyb2h80ns71w0000gn/T/pip-install-39atpdw_/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/z0/8lrh7p551kl3tyb2h80ns71w0000gn/T/pip-install-39atpdw_/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/z0/8lrh7p551kl3tyb2h80ns71w0000gn/T/pip-pip-egg-info-57ml1is8
         cwd: /private/var/folders/z0/8lrh7p551kl3tyb2h80ns71w0000gn/T/pip-install-39atpdw_/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/z0/8lrh7p551kl3tyb2h80ns71w0000gn/T/pip-install-39atpdw_/mysqlclient/setup.py", line 16, in <module>
        metadata, options = get_config()
      File "/private/var/folders/z0/8lrh7p551kl3tyb2h80ns71w0000gn/T/pip-install-39atpdw_/mysqlclient/setup_posix.py", line 61, in get_config
        libs = mysql_config("libs")
      File "/private/var/folders/z0/8lrh7p551kl3tyb2h80ns71w0000gn/T/pip-install-39atpdw_/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.

Я пытался обновить pip с помощью pip install --upgrade pip но все еще та же ошибка

Мне нужно установить mysqlclient, чтобы загрузить pandas DataFrame в mysql базу данных в AWS.

Как исправить эту ошибку?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...