gpt4 book ai didi

python - 运行 `pip install` 的 Ubuntu 给出错误 'The following required packages can not be built: * freetype'

转载 作者:IT老高 更新时间:2023-10-28 12:26:13 33 4
gpt4 key购买 nike

在执行 pip install -r requirements.txt 时,在安装 matplotlib 的阶段出现以下错误:

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.]

...

The following required packages can not be built:

* freetype

不应该 pip install -r requirements.txt 也安装 freetype 吗?应该如何在 Ubuntu 12.04 中安装 freetype 以便它可以与 matplotlib 一起使用?

最佳答案

没有。 pip 不会安装系统级依赖项。这意味着 pip 不会安装 RPM(Redhat 系统)或 DEB(Debian 系统)。

要安装系统依赖项,您需要根据您的系统使用以下方法之一。

Ubuntu/Debian:

apt-get install libfreetype6-dev

在基于 Ubuntu/Debian 的系统上搜索软件包:

apt-cache search <string>

例如:

apt-cache search freetype | grep dev

Redhat/CentOS/Fedora:

yum -y install freetype-devel

在基于 Redhat/CentOS/Fedora 的系统上搜索软件包:

yum search <string>

例如:

yum search freetype | grep devel

Mac OS X:(通过 Homebrew )

brew install freetype

在基于 Mac OS X 的系统上搜索软件包:

brew search <string>

例如:

brew search freetype

关于python - 运行 `pip install` 的 Ubuntu 给出错误 'The following required packages can not be built: * freetype',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20533426/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com