[英]Python matplotlib install issue on Windows 7 for freetype, png packages
[英]Python installing old version of matplotlib results in freetype and png error
我正在嘗試安裝以下 package: https://pypi.org/project/autocluster/
但是,它看起來需要使用 matplotlib==3.0.3,因為當我嘗試安裝它時出現以下錯誤:
我已經安裝了較新版本的 matplotlib,我也嘗試安裝舊版本,但它的核心是使用 3.0.3 構建新的 package。 如何正確安裝此版本或繞過該問題?
pip3 install matplotlib==3.0.3 -U
Looking in indexes: https://pypi.org/simple, https://1205d49dc47b4644d672f57e74f850e6342693e3f0b8cf0b:****@packagecloud.io/agrible/internal/pypi/simple
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: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cbungo0j/matplotlib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cbungo0j/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 /tmp/pip-install-cbungo0j/matplotlib/pip-egg-info
cwd: /tmp/pip-install-cbungo0j/matplotlib/
Complete output (51 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-cbungo0j/matplotlib/setup.py", line 225, in <module>
msg = pkg.install_help_msg()
File "/tmp/pip-install-cbungo0j/matplotlib/setupext.py", line 650, in install_help_msg
release = platform.linux_distribution()[0].lower()
AttributeError: module 'platform' has no attribute 'linux_distribution'
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.2 (default, Apr 27 2020, 15:53:34) [GCC
9.3.0]]
platform: yes [linux]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.18.5]
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 freetype2 (ft2build.h)
could not be found. You may need to install the
development package.]
png: no [pkg-config information for 'libpng' could not
be found.]
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: no [Microsoft Windows only]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
============================================================================
* The following required packages can not be built:
* freetype, png
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
注意我正在用我的 windows 機器在 Ubuntu 上安裝它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.