用 python setup.py install 安装 matplotlib 报错
错误信息如下:
running install
running bdist_egg
running egg_info
writing requirements to lib/matplotlib.egg-info/requires.txt
writing lib/matplotlib.egg-info/PKG-INFO
writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt
writing top-level names to lib/matplotlib.egg-info/top_level.txt
writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt
reading manifest file 'lib/matplotlib.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-x86_64-2.7/matplotlib/mpl-data
running build_ext
building 'matplotlib._png' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib__png_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/python27/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/local/python27/include/python2.7 -c src/_png.cpp -o build/temp.linux-x86_64-2.7/src/_png.o
src/_png.cpp:10:20: error: png.h: No such file or directory
In file included from /usr/local/python27/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804,
from /usr/local/python27/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /usr/local/python27/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from src/_png.cpp:28:
/usr/local/python27/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
src/_png.cpp:243:48: error: macro "npy_PyFile_DupClose" requires 3 arguments, but only 2 given
src/_png.cpp:264:44: error: macro "npy_PyFile_DupClose" requires 3 arguments, but only 2 given
src/_png.cpp:577:44: error: macro "npy_PyFile_DupClose" requires 3 arguments, but only 2 given
In file included from src/file_compat.h:4,
from src/_png.cpp:31:
/usr/local/python27/lib/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h: In function ?.yObject* npy_PyFile_OpenFile(PyObject*, const char*)?.
/usr/local/python27/lib/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h:348: warning: deprecated conversion from string constant to ?.har*?
/usr/local/python27/lib/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h: In function ?.nt npy_PyFile_CloseFile(PyObject*)?.
/usr/local/python27/lib/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h:356: warning: deprecated conversion from string constant to ?.har*?
src/_png.cpp: At global scope:
src/_png.cpp:68: error: variable or field ?.rite_png_data?.declared void
src/_png.cpp:68: error: ?.ng_structp?.was not declared in this scope
src/_png.cpp:68: error: ?.ng_bytep?.was not declared in this scope
src/_png.cpp:68: error: ?.ng_size_t?.was not declared in this scope
/usr/local/python27/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1629: warning: ?.nt _import_array()?.defined but not used
error: command 'gcc' failed with exit status 1
系统信息:
CentOS 6.3 64bit
Python 2.6.x
matplotlib 1.3.1
相关阅读:
centos 升级glibc疑问?
如何打造高安全性的web环境?
上传的文件已存在,就能该传什么参数去覆盖它?
zrender能否实现标签式引入?
BrowserSync + MockJS 运行报错
js中原型对象的writable为什么会影响到实例对象?
Android studio如何修改默认的依赖包
ios在页面滚动时能够响应异步的点击事件么?
请教一道设计题。每个城市的IP段是固定的,新来一个IP,找出它是哪个城市的,设计一个后台系统。这个是考什么呢?
iOS collectionView自定义的cell 检测其他自定义的cell并改变内容 用什么实现?
为什么在使用svg做图标时,图标边缘总是会被砍掉一点
360doc个人图书馆里的禁止复制是怎么实现的?
通过订单数据表生成每日的订单数量和增长量统计报表,该如何编写sql?
作为微信公众号开发者为粉丝提供下载instagram图片功能
如何非交互方式使用GDB打印core文件堆栈?
apache ErrorLog配置的错误日志和PHP的错误日志有区别吗?
原生获取多组相同类名
php中header前有输出 不报warning提示
一个简单的jQuery问题,click后没有反应??怎么办
数据筛选组件,只实现了样式还没有具体数据筛选的功能,请帮我看看JS代码应该怎么改进。