pip install matplotlib失败:'无法建立软件包freetype; " python setup.py egg_info"失败,错误代码为1' [英] pip install matplotlib fails: 'cannot build package freetype; "python setup.py egg_info" failed with error code 1'
本文介绍了pip install matplotlib失败:'无法建立软件包freetype; " python setup.py egg_info"失败,错误代码为1'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用matplotlib.pyplot.我不能因为
I want to use matplotlib.pyplot. I can't because
altoidnerd@LEPTON:~/ $ pip install matplotlib
在ubuntu 14上失败,给出egg_info错误,并警告无法构建软件包freetype"
is failing on ubuntu 14 giving an egg_info error, and warning "cannot build package 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
my debug.log is here: http://pastebin.com/rvDuYDiy
去年在github上有关此问题的讨论已结束,但我无法使用它来解决问题(我留下了笔记):
A discussion about this on github was closed last year, but I was unable to use it to solve the problem (I left a note):
https://github.com/matplotlib/matplotlib/issues/3029
我也启动了 reddit线程.
推荐答案
这对我有用:
sudo apt-get install libfreetype6-dev pkg-config
这篇关于pip install matplotlib失败:'无法建立软件包freetype; " python setup.py egg_info"失败,错误代码为1'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文