Matplotlib安装问题。点子Centos-Freetype“ Missing”安装时 [英] Matplotlib install issues. Pip Centos - Freetype "Missing" when it is installed

查看:143
本文介绍了Matplotlib安装问题。点子Centos-Freetype“ Missing”安装时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用virtualenv进行Django设置。我正在尝试建立一个视图,该视图从日志中提取数据,然后对数据进行图形处理。最终,我想拥有这种实时的生活。如果您对其他最适合我的项目的解决方案有任何建议,请不要犹豫,将它们包含在下面的注释字段中。

I am using a virtualenv for a django setup. I am trying to build a view that pulls data from logs and then graphs the data. Eventually I would like to have this real-time and live. If you have any recommendations on other solutions that would suit my project best, please do not hesitate to include them in the comment fields below.

我尝试从以下位置安装matplotlib使用pip install matplotlib进行pip。

I have attempted to install matplotlib from pip using pip install matplotlib.

我收到以下消息:

* The following required packages can not be built:
* freetype

我随后验证了已安装

yum install freetype 
Package freetype-2.3.11-14.el6_3.1.x86_64 already installed and latest version

然后我发现有一个python-matplotlib,它是.99的旧版本。但是,我想将其保留在虚拟环境中,而不是整个系统。

I then found that there is a python-matplotlib which is an older version .99. However, I want to keep this inside of the virtual environment and not system wide.

find / -name *freetype*
/var/lib/yum/yumdb/f/d2807dcfe3762c0b9f8ef1d9bf0f05788e73282a-freetype-2.3.11-14.el6_3.1-  x86_64
/usr/lib64/libfreetype.so.6.3.22
/usr/lib64/libfreetype.so.6
/usr/share/doc/freetype-2.3.11

我在stackoverflow上进行了全面搜索,只看到了ubuntu的解决方案

I searched all over stackoverflow and only saw solutions for ubuntu which did not transfer over to centos.

谢谢您的时间,
John

Thank you for your time, John

推荐答案

pip将在本地计算机上编译matlibplot,因此您还需要安装自由类型开发标头。

pip is going to compile matlibplot on your local machine, so you'll need freetype development headers installed as well.

CentOS 6 +,Fedora,等等:

CentOS 6+, Fedora, etc.:

$ sudo yum -y install freetype freetype-devel libpng-devel

在较旧的操作系统(例如CentOS 5)上,使用较新的matlibplot发行版可能会遇到更具体的自由类型版本问题。如果您不知道版本,则坚持使用旧版1.3.x版本将消除这些依赖性问题:

On older operating systems (e.g. CentOS 5), you may run into a more specific freetype versioning issue with newer releases of matlibplot. If you're version agnostic, sticking with a legacy 1.3.x release will negate these dependency issues:

$ pip install matplotlib==1.3.1

请注意,您可能需要将numpy降级为1.8才能制作matplotlib 1.3工作。

Please note, you may need to downgrade your numpy to 1.8 in order to make matplotlib 1.3 work.

$ pip install numpy==1.8

祝你好运!

这篇关于Matplotlib安装问题。点子Centos-Freetype“ Missing”安装时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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