pip matplotlib报错equired packages can not be built解决

yipeiwu_com5年前Python基础

pip安装matplotlib

在centos6.5 64bit上用pip安装matplotlib时候报错:

* The following required packages can not be built:
            * freetype, png
error: Setup script exited with 1

这是因为pip不能安装操作系统的依赖库导致的,需要用yum手动安装:

$ yum -y install freetype-devel libpng-devel

如果不知道这些库需要安装的包名,可以查一下:

$ yum search freetype | grep devel
  freetype-devel.i686 : FreeType development libraries and header files
  freetype-devel.x86_64 : FreeType development libraries and header files
$ yum search png | grep devel
  libpng-devel.i686 : Development tools for programs to manipulate PNG image
  libpng-devel.x86_64 : Development tools for programs to manipulate PNG image

referance:

matplotlib简介,安装和简单实例代码

python的numpy模块安装不成功简单解决方法总结

总结

以上就是本文关于pip matplotlib报错equired packages can not be built解决的全部内容,希望对大家有所帮助。感兴趣的朋友可以继续参阅本站其他相关专题,如有不足之处,欢迎留言指出。感谢朋友们对本站的支持!

相关文章

简介Python中用于处理字符串的center()方法

 center()方法返回集中在长度宽度的字符串。填充是通过使用specifiedfillchar。默认填充字符是一个空格。 语法 以下是center()方法的语法: st...

在Python中处理字符串之isdecimal()方法的使用

 isdecimal()方法检查字符串是否仅由十进制字符组成。此方法只存在于unicode对象。 注意:要定义一个字符串为Unicode,只需前缀分配'u'左引号。以下是示例。...

Python实现将SQLite中的数据直接输出为CVS的方法示例

本文实例讲述了Python实现将SQLite中的数据直接输出为CVS的方法。分享给大家供大家参考,具体如下: 对于SQLite来说,目前查看还是比较麻烦,所以就像把SQLite中的数据直...

Python subprocess模块学习总结

一、subprocess以及常用的封装函数运行python的时候,我们都是在创建并运行一个进程。像Linux进程那样,一个进程可以fork一个子进程,并让这个子进程exec另外一个程序。...

Python微信操控itchat的方法

Python微信操控itchat的方法

itchat是一个开源的微信个人号接口,使用python调用微信从未如此简单。 开源地址 https://github.com/littlecodersh/ItChat 文档: http...