在Mac OS上的python3中安装mysqlclient

时间:2020-01-07 07:43:16

标签: django python-3.7

在python3系统中安装mysqlclient这个错误

命令pip3 install mysqlclient

错误:命令错误,退出状态为1:python setup.py egg_info检查日志以获取完整的命令输出。

ERROR: Command errored out with exit status 1:
 command: /usr/local/opt/python/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tj/vjwl0qpd6l5ct6bdjgwyk1rh0000gp/T/pip-install-abwz3tky/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/tj/vjwl0qpd6l5ct6bdjgwyk1rh0000gp/T/pip-install-abwz3tky/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/tj/vjwl0qpd6l5ct6bdjgwyk1rh0000gp/T/pip-install-abwz3tky/mysqlclient/pip-egg-info
     cwd: /private/var/folders/tj/vjwl0qpd6l5ct6bdjgwyk1rh0000gp/T/pip-install-abwz3tky/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/tj/vjwl0qpd6l5ct6bdjgwyk1rh0000gp/T/pip-install-abwz3tky/mysqlclient/setup.py", line 16, in <module>
    metadata, options = get_config()
  File "/private/var/folders/tj/vjwl0qpd6l5ct6bdjgwyk1rh0000gp/T/pip-install-abwz3tky/mysqlclient/setup_posix.py", line 61, in get_config
    libs = mysql_config("libs")
  File "/private/var/folders/tj/vjwl0qpd6l5ct6bdjgwyk1rh0000gp/T/pip-install-abwz3tky/mysqlclient/setup_posix.py", line 29, in mysql_config
    raise EnvironmentError("%s not found" % (_mysql_config_path,))
OSError: mysql_config not found
----------------------------------------

0 个答案:

没有答案