首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行` `pip install`的Ubuntu出现错误‘无法构建以下必需的软件包:* freetype’

运行` `pip install`的Ubuntu出现错误‘无法构建以下必需的软件包:* freetype’
EN

Stack Overflow用户
提问于 2013-12-12 09:35:07
回答 8查看 92.3K关注 0票数 146

在安装matplotlib的阶段执行pip install -r requirements.txt时,我得到了以下错误

代码语言:javascript
复制
REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [not found. pip may install it below.]
              dateutil: yes [dateutil was not found. It is required for date
                        axis support. pip/easy_install may attempt to
                        install it after matplotlib.]
               tornado: yes [tornado was not found. It is required for the
                        WebAgg backend. pip/easy_install may attempt to
                        install it after matplotlib.]
             pyparsing: yes [pyparsing was not found. It is required for
                        mathtext support. pip/easy_install may attempt to
                        install it after matplotlib.]
                 pycxx: yes [Couldn't import.  Using local copy.]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: no  [pkg-config information for 'freetype2' could
                        not be found.]

..。

代码语言:javascript
复制
The following required packages can not be built:

                    * freetype

pip install -r requirements.txt不也应该安装freetype吗?如何在Ubuntu12.04中安装freetype才能与matplotlib兼容

EN

回答 8

Stack Overflow用户

发布于 2014-06-28 18:21:28

我必须安装libxft-dev才能在ubuntu服务器14.04上启用matplotlib。

代码语言:javascript
复制
sudo apt-get install libfreetype6-dev libxft-dev

然后我就可以用

代码语言:javascript
复制
sudo easy_install matplotlib
票数 146
EN

Stack Overflow用户

发布于 2015-01-05 13:06:03

一种变通方法是使用我发现的in this github issue来做sudo apt-get install pkg-config

票数 28
EN

Stack Overflow用户

发布于 2015-02-25 07:39:45

对于我在Ubuntu上升级matplotlib来说,现有的答案都不起作用。这就是最终对我有效的方法:

代码语言:javascript
复制
$ sudo apt-get install build-dep python-matplotlib
$ pip install matplotlib --upgrade
票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20533426

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档