我是一名 Mac 用户,试图安装这个特定版本的 matplotlib,但我不断收到此错误。我已确保我拥有所需的软件包,但不确定如何确保它们位于正确的位置。目前,我无法使绘图适用于我正在处理的各种代码。错误如下:
pip3 install matplotlib==3.0.3
Collecting matplotlib==3.0.3
Using cached matplotlib-3.0.3.tar.gz (36.6 MB)
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/g5/20g6q1l91sd1v97fz778n5wr0000gp/T/pip-install-yozx599p/matplotlib/setup.py'"'"'; __file__='"'"'/private/var/folders/g5/20g6q1l91sd1v97fz778n5wr0000gp/T/pip-install-yozx599p/matplotlib/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/g5/20g6q1l91sd1v97fz778n5wr0000gp/T/pip-install-yozx599p/matplotlib/pip-egg-info
cwd: /private/var/folders/g5/20g6q1l91sd1v97fz778n5wr0000gp/T/pip-install-yozx599p/matplotlib/
Complete output (44 lines):
IMPORTANT WARNING:
pkg-config is not installed.
matplotlib may not be able to find some of its dependencies
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [3.0.3]
python: yes [3.8.0 …Run Code Online (Sandbox Code Playgroud)