由于还没有用于python3.5的matplotlib的正式释放,所以我尝试使用pip。
pip install matplotlib它说我缺少一些必需的依赖关系和扩展。
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.10.0.post2]
six: yes [using six version 1.9.0]
dateutil: yes [using dateutil version 2.4.2]
pytz: yes [using pytz version 2015.6]
tornado: yes [using tornado version 4.2.1]
pyparsing: yes [using pyparsing version 2.0.3]
pycxx: yes [Official versions of PyCXX are not compatible
with matplotlib on Python 3.x, since they lack
support for the buffer object. Using local copy]
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.]
[...]
Command "python setup.py egg_info" failed with error code 1 in C:\Users\me\AppData\Local\Temp\pip-build-bjiqixce\matplotlib但是我的系统上安装了免费类型和png。
C:\Users\me>where ft2build.h
C:\Users\me\libs\GnuWin32\include\ft2build.h
C:\Users\me>where png.h
C:\Users\me\libs\GnuWin32\include\png.h所有这些都是以正常用户权限安装的。我在这里做错什么了?
编辑:yaypython3.5版本现在已经存在。
发布于 2015-11-03 02:26:07
诺兹杜尔
在为python 3.5安装Matplotlib时,我遇到了与您相同的问题。对我起作用的是,首先下载一个用于CMake的二进制发行版,然后用ISO for VS2010安装VB2010。在完成CMake和VB2010的下载和安装之后,我再次运行
pip install matplotlib此外,如果前面的解决方案不起作用,尽管下面的解决方案对我不起作用,那么jbmohler编译的一组脚本可以在windows上构建matplotlib:
这是一组脚本,用于在MS平台上从源代码构建matplotlib。它构建matplotlib,只需要Visual和CMake作为先决条件;其他库依赖项嵌入到这个存储库中。在此构建脚本中,任何复杂的或其他依赖项都被认为是bug。 从
http://www.python.org提供的Python是用Visual 2008编译的,用于3.3之前的版本,Visual 2010用于3.3及更高版本。建议使用相同的编译器编译Python扩展。这些脚本和matplotlib setup.py通过distutils查找正确的版本。.NET Framework4.0是MSBuild所必需的,但您可能已经拥有它了。 除了Visual之外,构建libpng还需要CMake。对于构建文档,您需要安装numpydoc和miktex。所需的免费类型、zlib、libpng、tcl、& tk源代码与此存储库捆绑在一起,因为没有规范的Windows包管理器。 要在Python中构建和安装matplotlib,请执行以下操作: git克隆https://github.com/matplotlib/matplotlib git克隆https://github.com/jbmohler/matplotlib-winbuild python winbuild\buildall.py 构建脚本将自动检测Python版本& 32/64位。 这些脚本的来源是https://github.com/matplotlib/matplotlib/issues/1717中cgohlke的注释。
https://stackoverflow.com/questions/33168656
复制相似问题