收集matplotlib 使用缓存的matplotlib-1.5.2.tar.gz 从命令python setup.py egg_info完成输出: ================================================== ========================== 编辑setup.cfg以更改构建选项
BUILDING MATPLOTLIB
matplotlib: yes [1.5.2]
python: yes [3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015,
01:38:48) [MSC v.1900 32 bit (Intel)]]
platform: yes [win32]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.11.1]
dateutil: yes [using dateutil version 2.5.3]
pytz: yes [using pytz version 2016.6.1]
cycler: yes [cycler was not found. pip will attempt to
install it after matplotlib.]
tornado: yes [tornado was not found. It is required for the
WebAgg backend. pip/easy_install may attempt to
install it after matplotlib.]
pyparsing: yes [pyparsing was not found. It is required for
mathtext support. pip/easy_install may attempt to
install it after matplotlib.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype (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 'qhull' could not be
found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: yes [nose 0.11.1 or later is required to run the
matplotlib test suite. Please install it with pip or
your preferred tool to run the test suite / using
unittest.mock]
toolkits_tests: yes [nose 0.11.1 or later is required to run the
matplotlib test suite. Please install it with pip or
your preferred tool to run the test suite / using
unittest.mock]
OPTIONAL BACKEND EXTENSIONS
macosx: no [Mac OS-X only]
qt5agg: no [PyQt5 not found]
qt4agg: no [PySide not found; PyQt4 not found]
gtk3agg: no [Requires pygobject to be installed.]
gtk3cairo: no [Requires cairocffi or pycairo to be installed.]
gtkagg: no [Requires pygtk]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
wxagg: no [requires wxPython]
gtk: no [Requires pygtk]
agg: yes [installing]
cairo: no [cairocffi or pycairo not found]
windowing: yes [installing]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: no
latex: no
pdftops: no
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
============================================================================
* The following required packages can not be built:
* freetype, png
----------------------------------------
命令“python setup.py egg_info”失败,错误代码1在C:\ Users \ User \ AppData \ Local \ Temp \ pycharm-packaging \ matplotlib \
我已尝试卸载并再次安装pip,但它无法正常工作。我不知道该怎么办。 :( 如果你能用西班牙语发表评论会对我有所帮助,那么我的英语不太好,谢谢你。
答案 0 :(得分:0)
我在.whl文件中安装了matplotlib,它对我有用。我是从这个网站http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib得到的。下载正确的.whl包(即如果您有Python 3.5.1 64位下载matplotlib-2.0.0b3-cp35-cp35m-win_amd64.whl)然后转到文件资源管理器并转到您下载.whl文件的文件夹。在文件资源管理器上,单击文件 - >打开命令提示符 - >以管理员身份打开。然后输入此
pip install (fileName.whl)
如果没有找到pip,那就去文件资源管理器中下载python的地方。转到脚本文件夹并在那里打开它。您可以将.whl文件复制并粘贴到scripts文件夹中。然后再次键入pip install命令。完成后,您可以通过转到IDLE并尝试导入它来检查它是否有效
import matplotlib
如果它运行意味着你正确安装它。这是我知道安装matplotlib的唯一方法,如果它不起作用,那就很抱歉。