pip安装matplotlib报错:equired packages can not be built

前端之家收集整理的这篇文章主要介绍了pip安装matplotlib报错:equired packages can not be built前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

pip安装matplotlib

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

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

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

  1. $ yum -y install freetype-devel libpng-devel

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

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

参考:
http://stackoverflow.com/questions/20533426/ubuntu-running-pip-install-gives-error-the-following-required-packages-can-no

猜你在找的CentOS相关文章