具体表现如下
C:\Users\HUAWEI>pip 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: 'E:\Python\python3.9\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HUAWEI\AppData\Local\Temp\pip-install-egmvod84\matplotlib_4912d82b3a3943758c3eb641687f338b\setup.py'"'"'; file='"'"'C:\Users\HUAWEI\AppData\Local\Temp\pip-install-egmvod84\matplotlib_4912d82b3a3943758c3eb641687f338b\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\HUAWEI\AppData\Local\Temp\pip-pip-egg-info-doh6idc2'
cwd: C:\Users\HUAWEI\AppData\Local\Temp\pip-install-egmvod84\matplotlib_4912d82b3a3943758c3eb641687f338b
Complete output (47 lines):
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [3.0.3]
python: yes [3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021,
20:19:38) [MSC v.1929 64 bit (AMD64)]]
platform: yes [win32]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.21.2]
install_requires: yes [handled by setuptools]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype
(freetype2\ft2build.h) could not be found. You may
need to install the development package.]
png: no [The C/C++ header for png (png.h) could not be
found. You may need to install the development
package.]
qhull: yes [pkg-config information for 'libqhull' could not
be found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: no [skipping due to configuration]
toolkits_tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
agg: yes [installing]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
macosx: no [Mac OS-X only]
windowing: yes [installing]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
============================================================================
* The following required packages can not be built:
* freetype, png
* Please check http://gnuwin32.sourceforge.net/packa
* ges/freetype.htm for instructions to install
* freetype
* Please check http://gnuwin32.sourceforge.net/packa
* ges/libpng.htm for instructions to install png
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/26/04/8b381d5b166508cc258632b225adbafec49bbe69aa9a4fa1f1b461428313/matplotlib-3.0.3.tar.gz#sha256=e1d33589e32f482d0a7d1957bf473d43341115d40d33f578dad44432e47df7b7 (from
) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.BUILDING MATPLOTLIB
matplotlib: yes [3.0.3]
python: yes [3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021,
20:19:38) [MSC v.1929 64 bit (AMD64)]]
platform: yes [win32]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.21.2]
install_requires: yes [handled by setuptools]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype
(freetype2\ft2build.h) could not be found. You may
need to install the development package.]
png: no [The C/C++ header for png (png.h) could not be
found. You may need to install the development
package.]
qhull: yes [pkg-config information for 'libqhull' could not
be found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: no [skipping due to configuration]
toolkits_tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
agg: yes [installing]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
macosx: no [Mac OS-X only]
windowing: yes [installing]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
============================================================================
* The following required packages can not be built:
* freetype, png
* Please check http://gnuwin32.sourceforge.net/packa
* ges/freetype.htm for instructions to install
* freetype
* Please check http://gnuwin32.sourceforge.net/packa
* ges/libpng.htm for instructions to install png
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/26/04/8b381d5b166508cc258632b225adbafec49bbe69aa9a4fa1f1b461428313/matplotlib-3.0.3.tar.gz#sha256=e1d33589e32f482d0a7d1957bf473d43341115d40d33f578dad44432e47df7b7 (from
) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.