【发布时间】:2021-03-07 19:57:26
【问题描述】:
我正在尝试使用 PyCharm 安装 mysql。
我收到此错误:
ERROR: Command errored out with exit status 1:
Collecting mysql
Using cached mysql-0.0.2.tar.gz (1.9 kB)
Collecting mysqlclient
Using cached mysqlclient-2.0.3.tar.gz (88 kB)
ERROR: Command errored out with exit status 1:
command: /Users/ricochetnkweso/PycharmProjects/pythonProject/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x_/_3xykb3s1hl53blcpm28whhc0000gn/T/pip-install-9uhsqjjy/mysqlclient_826a924a2869420fbfa9349807b2e145/setup.py'"'"'; __file__='"'"'/private/var/folders/x_/_3xykb3s1hl53blcpm28whhc0000gn/T/pip-install-9uhsqjjy/mysqlclient_826a924a2869420fbfa9349807b2e145/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/x_/_3xykb3s1hl53blcpm28whhc0000gn/T/pip-pip-egg-info-w9uge2w2
cwd: /private/var/folders/x_/_3xykb3s1hl53blcpm28whhc0000gn/T/pip-install-9uhsqjjy/mysqlclient_826a924a2869420fbfa9349807b2e145/
Complete output (15 lines):
mysql_config --version
/bin/sh: mysql_config: command not found
mariadb_config --version
/bin/sh: mariadb_config: command not found
mysql_config --libs
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/x_/_3xykb3s1hl53blcpm28whhc0000gn/T/pip-install-9uhsqjjy/mysqlclient_826a924a2869420fbfa9349807b2e145/setup.py", line 15, in <module>
metadata, options = get_config()
File "/private/var/folders/x_/_3xykb3s1hl53blcpm28whhc0000gn/T/pip-install-9uhsqjjy/mysqlclient_826a924a2869420fbfa9349807b2e145/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/private/var/folders/x_/_3xykb3s1hl53blcpm28whhc0000gn/T/pip-install-9uhsqjjy/mysqlclient_826a924a2869420fbfa9349807b2e145/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_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.
WARNING: You are using pip version 20.3.1; however, version 21.0.1 is available.
You should consider upgrading via the '/Users/ricochetnkweso/PycharmProjects/pythonProject/venv/bin/python -m pip install --upgrade pip' command.
我应该使用终端安装 MySQL 吗?我不确定实际的问题是什么。
【问题讨论】: