gpt4 book ai didi

matplotlib - pip安装matplotlib失败: 'cannot build package freetype; “python setup.py egg_info” failed with error code 1'

转载 作者:行者123 更新时间:2023-12-04 13:38:37 24 4
gpt4 key购买 nike

我想使用matplotlib.pyplot。我不能因为

altoidnerd@LEPTON:~/ $ pip install matplotlib

在ubuntu 14上失败,给出egg_info错误,并警告“无法构建软件包freetype”
* The following required packages can not be built:

* freetype

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8UvQcW/matplotlib


altoidnerd@LEPTON:~/$ dpkg -L libfreetype6
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libfreetype.so.6.11.1
/usr/share
/usr/share/doc
/usr/share/doc/libfreetype6
/usr/share/doc/libfreetype6/FTL.TXT.gz
/usr/share/doc/libfreetype6/ft2faq.html
/usr/share/doc/libfreetype6/TODO
/usr/share/doc/libfreetype6/copyright
/usr/share/doc/libfreetype6/changelog.Debian.gz
/usr/share/doc/libfreetype6/pcf
/usr/share/doc/libfreetype6/pcf/README
/usr/lib/x86_64-linux-gnu/libfreetype.so.6

我的debug.log在这里: http://pastebin.com/rvDuYDiy

去年在github上有关此问题的讨论已关闭,但我无法使用它来解决问题(我留下了笔记):

https://github.com/matplotlib/matplotlib/issues/3029

我也开始了 reddit thread

最佳答案

这帮了我大忙:

sudo apt-get install libfreetype6-dev pkg-config

关于matplotlib - pip安装matplotlib失败: 'cannot build package freetype; “python setup.py egg_info” failed with error code 1',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28914202/

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