我正在尝试使用 Python 的安装程序在我的 Windows 10 64 位计算机上安装 Matplotlib pip
。任何建议都将不胜感激。当我尝试时,我得到了以下我无法理解的大量错误返回:
C:\Users\Todd Huffman>python -m pip install matplotlib
Collecting matplotlib
Using cached https://files.pythonhosted.org/packages/12/d1/7b12cd79c791348cb0c78ce6e7d16bd72992f13c9f1e8e43d2725a6d8adf/matplotlib-3.1.1.tar.gz
Requirement already satisfied: cycler>=0.10 in d:\python38\lib\site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in d:\python38\lib\site-packages (from matplotlib) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in d:\python38\lib\site-packages (from matplotlib) (2.4.2)
Requirement already satisfied: python-dateutil>=2.1 in d:\python38\lib\site-packages (from matplotlib) (2.8.0)
Requirement already satisfied: numpy>=1.11 in d:\python38\lib\site-packages (from matplotlib) (1.17.2)
Requirement already satisfied: six in d:\python38\lib\site-packages (from cycler>=0.10->matplotlib) (1.12.0)
Requirement already satisfied: setuptools in d:\python38\lib\site-packages (from kiwisolver>=1.0.1->matplotlib) (41.2.0)
Installing collected packages: matplotlib
Running setup.py install for matplotlib ... error
ERROR: Command errored out with exit status 1:
command: 'D:\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Todd Huffman\\AppData\\Local\\Temp\\pip-install-_sa1y_nr\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Todd Huffman\\AppData\\Local\\Temp\\pip-install-_sa1y_nr\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Todd Huffman\AppData\Local\Temp\pip-record-50m5un7r\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\Todd Huffman\AppData\Local\Temp\pip-install-_sa1y_nr\matplotlib\
Complete output (505 lines):
================================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [3.1.1]
python: yes [3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC
v.1916 64 bit (AMD64)]]
platform: yes [win32]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
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]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying lib\pylab.py -> build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\afm.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\animation.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\artist.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\axis.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\backend_bases.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\backend_managers.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\backend_tools.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\bezier.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\blocking_input.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\category.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\cm.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\collections.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\colorbar.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\colors.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\container.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\contour.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\dates.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\docstring.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\dviread.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\figure.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\fontconfig_pattern.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\font_manager.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\gridspec.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\hatch.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\image.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\legend.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\legend_handler.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\lines.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\markers.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\mathtext.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\mlab.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\offsetbox.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\patches.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\path.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\patheffects.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\pylab.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\pyplot.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\quiver.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\rcsetup.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\sankey.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\scale.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\spines.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\stackplot.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\streamplot.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\table.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\texmanager.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\text.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\textpath.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\ticker.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\tight_bbox.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\tight_layout.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\transforms.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\type1font.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\units.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\widgets.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\_animation_data.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\_cm.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\_cm_listed.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\_color_data.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\_constrained_layout.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\_layoutbox.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\_mathtext_data.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\_pylab_helpers.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\_version.py -> build\lib.win-amd64-3.8\matplotlib
copying lib\matplotlib\__init__.py -> build\lib.win-amd64-3.8\matplotlib
creating build\lib.win-amd64-3.8\mpl_toolkits
copying lib\mpl_toolkits\__init__.py -> build\lib.win-amd64-3.8\mpl_toolkits
creating build\lib.win-amd64-3.8\matplotlib\axes
copying lib\matplotlib\axes\_axes.py -> build\lib.win-amd64-3.8\matplotlib\axes
copying lib\matplotlib\axes\_base.py -> build\lib.win-amd64-3.8\matplotlib\axes
copying lib\matplotlib\axes\_secondary_axes.py -> build\lib.win-amd64-3.8\matplotlib\axes
copying lib\matplotlib\axes\_subplots.py -> build\lib.win-amd64-3.8\matplotlib\axes
copying lib\matplotlib\axes\__init__.py -> build\lib.win-amd64-3.8\matplotlib\axes
creating build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_agg.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_cairo.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_gtk3.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_gtk3agg.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_gtk3cairo.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_macosx.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_mixed.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_nbagg.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_pdf.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_pgf.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_ps.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_qt4.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_qt4agg.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_qt4cairo.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_qt5.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_qt5agg.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_qt5cairo.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_svg.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_template.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_tkagg.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_tkcairo.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_webagg.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_webagg_core.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_wx.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_wxagg.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\backend_wxcairo.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\qt_compat.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\tkagg.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\windowing.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\wx_compat.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\_backend_pdf_ps.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\_backend_tk.py -> build\lib.win-amd64-3.8\matplotlib\backends
copying lib\matplotlib\backends\__init__.py -> build\lib.win-amd64-3.8\matplotlib\backends
creating build\lib.win-amd64-3.8\matplotlib\cbook
copying lib\matplotlib\cbook\deprecation.py -> build\lib.win-amd64-3.8\matplotlib\cbook
copying lib\matplotlib\cbook\__init__.py -> build\lib.win-amd64-3.8\matplotlib\cbook
creating build\lib.win-amd64-3.8\matplotlib\compat
copying lib\matplotlib\compat\subprocess.py -> build\lib.win-amd64-3.8\matplotlib\compat
copying lib\matplotlib\compat\__init__.py -> build\lib.win-amd64-3.8\matplotlib\compat
creating build\lib.win-amd64-3.8\matplotlib\projections
copying lib\matplotlib\projections\geo.py -> build\lib.win-amd64-3.8\matplotlib\projections
copying lib\matplotlib\projections\polar.py -> build\lib.win-amd64-3.8\matplotlib\projections
copying lib\matplotlib\projections\__init__.py -> build\lib.win-amd64-3.8\matplotlib\projections
creating build\lib.win-amd64-3.8\matplotlib\sphinxext
copying lib\matplotlib\sphinxext\mathmpl.py -> build\lib.win-amd64-3.8\matplotlib\sphinxext
copying lib\matplotlib\sphinxext\plot_directive.py -> build\lib.win-amd64-3.8\matplotlib\sphinxext
copying lib\matplotlib\sphinxext\__init__.py -> build\lib.win-amd64-3.8\matplotlib\sphinxext
creating build\lib.win-amd64-3.8\matplotlib\style
copying lib\matplotlib\style\core.py -> build\lib.win-amd64-3.8\matplotlib\style
copying lib\matplotlib\style\__init__.py -> build\lib.win-amd64-3.8\matplotlib\style
creating build\lib.win-amd64-3.8\matplotlib\testing
copying lib\matplotlib\testing\compare.py -> build\lib.win-amd64-3.8\matplotlib\testing
copying lib\matplotlib\testing\conftest.py -> build\lib.win-amd64-3.8\matplotlib\testing
copying lib\matplotlib\testing\decorators.py -> build\lib.win-amd64-3.8\matplotlib\testing
copying lib\matplotlib\testing\determinism.py -> build\lib.win-amd64-3.8\matplotlib\testing
copying lib\matplotlib\testing\disable_internet.py -> build\lib.win-amd64-3.8\matplotlib\testing
copying lib\matplotlib\testing\exceptions.py -> build\lib.win-amd64-3.8\matplotlib\testing
copying lib\matplotlib\testing\__init__.py -> build\lib.win-amd64-3.8\matplotlib\testing
creating build\lib.win-amd64-3.8\matplotlib\tri
copying lib\matplotlib\tri\triangulation.py -> build\lib.win-amd64-3.8\matplotlib\tri
copying lib\matplotlib\tri\tricontour.py -> build\lib.win-amd64-3.8\matplotlib\tri
copying lib\matplotlib\tri\trifinder.py -> build\lib.win-amd64-3.8\matplotlib\tri
copying lib\matplotlib\tri\triinterpolate.py -> build\lib.win-amd64-3.8\matplotlib\tri
copying lib\matplotlib\tri\tripcolor.py -> build\lib.win-amd64-3.8\matplotlib\tri
copying lib\matplotlib\tri\triplot.py -> build\lib.win-amd64-3.8\matplotlib\tri
copying lib\matplotlib\tri\trirefine.py -> build\lib.win-amd64-3.8\matplotlib\tri
copying lib\matplotlib\tri\tritools.py -> build\lib.win-amd64-3.8\matplotlib\tri
copying lib\matplotlib\tri\__init__.py -> build\lib.win-amd64-3.8\matplotlib\tri
creating build\lib.win-amd64-3.8\matplotlib\backends\qt_editor
copying lib\matplotlib\backends\qt_editor\figureoptions.py -> build\lib.win-amd64-3.8\matplotlib\backends\qt_editor
copying lib\matplotlib\backends\qt_editor\formlayout.py -> build\lib.win-amd64-3.8\matplotlib\backends\qt_editor
copying lib\matplotlib\backends\qt_editor\formsubplottool.py -> build\lib.win-amd64-3.8\matplotlib\backends\qt_editor
copying lib\matplotlib\backends\qt_editor\_formlayout.py -> build\lib.win-amd64-3.8\matplotlib\backends\qt_editor
copying lib\matplotlib\backends\qt_editor\__init__.py -> build\lib.win-amd64-3.8\matplotlib\backends\qt_editor
creating build\lib.win-amd64-3.8\matplotlib\testing\jpl_units
copying lib\matplotlib\testing\jpl_units\Duration.py -> build\lib.win-amd64-3.8\matplotlib\testing\jpl_units
copying lib\matplotlib\testing\jpl_units\Epoch.py -> build\lib.win-amd64-3.8\matplotlib\testing\jpl_units
copying lib\matplotlib\testing\jpl_units\EpochConverter.py -> build\lib.win-amd64-3.8\matplotlib\testing\jpl_units
copying lib\matplotlib\testing\jpl_units\StrConverter.py -> build\lib.win-amd64-3.8\matplotlib\testing\jpl_units
copying lib\matplotlib\testing\jpl_units\UnitDbl.py -> build\lib.win-amd64-3.8\matplotlib\testing\jpl_units
copying lib\matplotlib\testing\jpl_units\UnitDblConverter.py -> build\lib.win-amd64-3.8\matplotlib\testing\jpl_units
copying lib\matplotlib\testing\jpl_units\UnitDblFormatter.py -> build\lib.win-amd64-3.8\matplotlib\testing\jpl_units
copying lib\matplotlib\testing\jpl_units\__init__.py -> build\lib.win-amd64-3.8\matplotlib\testing\jpl_units
creating build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\anchored_artists.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\angle_helper.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\axes_divider.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\axes_grid.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\axes_rgb.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\axes_size.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\axislines.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\axisline_style.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\axis_artist.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\clip_path.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\colorbar.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\floating_axes.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\grid_finder.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\grid_helper_curvelinear.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\inset_locator.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\parasite_axes.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
copying lib\mpl_toolkits\axes_grid\__init__.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid
creating build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
copying lib\mpl_toolkits\axes_grid1\anchored_artists.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
copying lib\mpl_toolkits\axes_grid1\axes_divider.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
copying lib\mpl_toolkits\axes_grid1\axes_grid.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
copying lib\mpl_toolkits\axes_grid1\axes_rgb.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
copying lib\mpl_toolkits\axes_grid1\axes_size.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
copying lib\mpl_toolkits\axes_grid1\colorbar.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
copying lib\mpl_toolkits\axes_grid1\inset_locator.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
copying lib\mpl_toolkits\axes_grid1\mpl_axes.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
copying lib\mpl_toolkits\axes_grid1\parasite_axes.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
copying lib\mpl_toolkits\axes_grid1\__init__.py -> build\lib.win-amd64-3.8\mpl_toolkits\axes_grid1
creating build\lib.win-amd64-3.8\mpl_toolkits\axisartist
copying lib\mpl_toolkits\axisartist\angle_helper.py -> build\lib.win-amd64-3.8\mpl_toolkits\axisartist
<many more 'copying' entries ensue and we pick it up later>
copying lib\matplotlib\mpl-data\fonts\ttf\STIXGeneral.ttf -> build\lib.win-amd64-3.8\matplotlib\mpl-data\fonts\ttf
UPDATING build\lib.win-amd64-3.8\matplotlib\_version.py
set build\lib.win-amd64-3.8\matplotlib\_version.py to '3.1.1'
running build_ext
building 'matplotlib.ft2font' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019NEW\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DFREETYPE_BUILD_TYPE=system -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -Iextern/agg24-svn/include -ID:\Python38\lib\site-packages\numpy\core\include -ID:\Python38\include -ID:\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019NEW\VC\Tools\MSVC\14.23.28105\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019NEW\VC\Tools\MSVC\14.23.28105\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/checkdep_freetype2.c /Fobuild\temp.win-amd64-3.8\Release\src/checkdep_freetype2.obj
checkdep_freetype2.c
src/checkdep_freetype2.c(1): fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019NEW\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Todd Huffman\\AppData\\Local\\Temp\\pip-install-_sa1y_nr\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Todd Huffman\\AppData\\Local\\Temp\\pip-install-_sa1y_nr\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Todd Huffman\AppData\Local\Temp\pip-record-50m5un7r\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
答案1
PyPI 上的 Matplotlib(pip
从哪里绘制包) 还没有适用whl
于 Python 3.8 的任何 . 文件 (截至撰写本文时)。因此 Python (正如您似乎知道的那样) 正在尝试从头开始构建,但失败了。值得一提的是,我个人在使用 Python 3.8/Matplotlib 时也遇到过类似的问题。
如果你想要一个快速的解决方案,你应该看看此页面由 Christoph Gohlke 运营。简而言之,它包含各种 Python 包的“非官方”Windows 版本,选择范围极其广泛,包括 32 位和 64 位版本的 Python 3.8 的 Matplotlib 3.1.1(matplotlib‑3.1.1‑cp38‑cp38‑win32.whl
和matplotlib‑3.1.1‑cp38‑cp38‑win_amd64.whl
分别)。
只需下载适合.whl
您的 Python 版本的版本,然后使用例如python -m pip install nameof.whl
安装 wheel。python -v
如果您不知道您的 Python 版本是 32 位还是 64 位,您可以使用。
顺便提一下,除了 Python 3.8 之外,我遇到了一个问题,每次我运行 Matplotlib 脚本时,Matplotlib 3.1.1 都会使 Python 崩溃。有问题的包实际上是的 PyPI 版本numpy
,特别是 OpenBLAS 的 DLL。我通过卸载的 PyPI 版本numpy
并将其替换为已引用页面中的版本来解决了这个问题numpy+mkl
。如果您遇到任何类似的问题,这只是一些额外的信息。