libpng版本在全新安装IPython时不兼容 [英] libpng version incompatibility in fresh installation of IPython

查看:154
本文介绍了libpng版本在全新安装IPython时不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了本指南来安装Python的科学堆栈(OSX 10.9.2,brewed Python 2.7.6,IPython 2.0,matplotlib 1.3.1,libpng 1.6.10)。一切都很好看。

I used this guide to install the "scientific stack" for Python (OSX 10.9.2, brewed Python 2.7.6, IPython 2.0, matplotlib 1.3.1, libpng 1.6.10). Everything was looking good.

然而,试图在IPython的笔记本环境中使用运行一个简单的情节 - pylab = inline 给我这个错误:

However, trying to run a simple plot in IPython's notebook environment with --pylab=inline gives me this error:

/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/ lib / python2.7 / site-packages / IPython / core / formatters.py:239:ForceterWarning:image / png formatter中的异常:无法创建write struct
FormatterWarning,

在终端中它说: libpng警告:使用libpng-1.5.17构建的应用程序,但运行1.6.10

据我所知,我没有安装其他libpng。我尝试从 / usr / local / 中删除​​以 libpng 开头的所有文件并重新安装所有内容,但无济于事。构建matplotlib( pip install matplotlib )的输出包含:

I have no other libpng installed as far as I can tell. I tried deleting all files beginning with libpng from /usr/local/ and reinstalling everything, to no avail. The output from building matplotlib (pip install matplotlib) contains:

BUILDING MATPLOTLIB
            matplotlib: yes [1.3.1]
                python: yes [2.7.6 (default, Mar 16 2014, 15:04:47)  [GCC
                        4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)]]
              platform: yes [darwin]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.8.1]
              dateutil: yes [using dateutil version 2.2]
               tornado: yes [using tornado version 3.2]
             pyparsing: yes [using pyparsing version 2.0.1]
                 pycxx: yes [Couldn't import.  Using local copy.]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: yes [version 17.2.11]
                   png: yes [version 1.6.10]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: yes [using nose version 1.3.1]

OPTIONAL BACKEND EXTENSIONS
                macosx: yes [installing, darwin]
                qt4agg: yes [installing, Qt: 4.8.6, PyQt4: 4.10.4]
               gtk3agg: no  [Requires pygobject to be installed.]
             gtk3cairo: no  [Requires cairo to be installed.]
                gtkagg: no  [Requires pygtk]
                 tkagg: yes [installing, version 81008]
                 wxagg: no  [requires wxPython]
                   gtk: no  [Requires pygtk]
                   agg: yes [installing]
                 cairo: no  [cairo not found]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: no
           ghostscript: no
                 latex: no
               pdftops: no

所以在我看来matplotlib应该针对libpng 1.6.10进行编译?有人可以帮我弄清楚发生了什么吗?

So it seems to me matplotlib should be compiled against libpng 1.6.10? Can someone help me figure out what's going on?

推荐答案

查找以png开头的旧头文件(png.h, pngconf.h,也许是其他人)并删除它们。

Look for old header files beginning with "png" (png.h, pngconf.h, perhaps others) and remove them.

这篇关于libpng版本在全新安装IPython时不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆