MySQL 安装失败

来源:4-19 pipeline数据库保存

弗兰克的IT生活

2021-03-03

    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/python@3.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/40/xfwrqjw5483cwh43vjdcj9_40000gn/T/pip-install-vugq2k8d/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/40/xfwrqjw5483cwh43vjdcj9_40000gn/T/pip-install-vugq2k8d/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/40/xfwrqjw5483cwh43vjdcj9_40000gn/T/pip-pip-egg-info-n0yz9ome
         cwd: /private/var/folders/40/xfwrqjw5483cwh43vjdcj9_40000gn/T/pip-install-vugq2k8d/mysqlclient/
    Complete output (15 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/40/xfwrqjw5483cwh43vjdcj9_40000gn/T/pip-install-vugq2k8d/mysqlclient/setup.py", line 15, in <module>
        metadata, options = get_config()
      File "/private/var/folders/40/xfwrqjw5483cwh43vjdcj9_40000gn/T/pip-install-vugq2k8d/mysqlclient/setup_posix.py", line 70, in get_config
        libs = mysql_config("libs")
      File "/private/var/folders/40/xfwrqjw5483cwh43vjdcj9_40000gn/T/pip-install-vugq2k8d/mysqlclient/setup_posix.py", line 31, in mysql_config
        raise OSError("{} not found".format(_mysql_config_path))
    OSError: mysql_config not found
    mysql_config --version
    mariadb_config --version
    mysql_config --libs
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

写回答

1回答

bobby

2021-03-05

如果自己安装mysql容易出错的话 可以使用docker安装mysql 不会出错

0
2
bobby
回复
弗兰克的IT生活
你是使用的主机安装还是使用的docker安装,建议使用docker安装会省去很多麻烦
2021-03-09
共2条回复

Scrapy打造搜索引擎 畅销4年的Python分布式爬虫课

带你彻底掌握Scrapy,用Django+Elasticsearch搭建搜索引擎

5795 学习 · 6290 问题

查看课程