为了账号安全,请及时绑定邮箱和手机立即绑定

python matplotlib 的安装问题

python matplotlib 的安装问题

手掌心 2019-05-25 16:34:57
1.系统环境python----->2.7.3ubuntu---->12.04pip---->9.0.12.在使用pipinstallmatplotlib报错:Completeoutputfromcommandpythonsetup.pyegg_info:============================================================================Editsetup.cfgtochangethebuildoptionsBUILDINGMATPLOTLIBmatplotlib:yes[2.0.2]python:yes[2.7.3(default,Jun222015,19:43:34)[GCC4.6.3]]platform:yes[linux2]REQUIREDDEPENDENCIESANDEXTENSIONSnumpy:yes[version1.13.1]six:yes[usingsixversion1.10.0]dateutil:yes[usingdateutilversion1.5]functools32:yes[functools32wasnotfound.ItisrequiredforPythonversionspriorto3.2]subprocess32:yes[subprocess32wasnotfound.ItusedforPythonversionspriorto3.2toimprovesfunctionalityonLinuxandOSX]pytz:yes[usingpytzversion2017.2]cycler:yes[cyclerwasnotfound.pipwillattempttoinstallitaftermatplotlib.]tornado:yes[tornadowasnotfound.ItisrequiredfortheWebAggbackend.pip/easy_installmayattempttoinstallitaftermatplotlib.]pyparsing:yes[pyparsingwasnotfound.Itisrequiredformathtextsupport.pip/easy_installmayattempttoinstallitaftermatplotlib.]libagg:yes[pkg-configinformationfor'libagg'couldnotbefound.Usinglocalcopy.]freetype:no[TheC/C++headerforfreetype2(ft2build.h)couldnotbefound.Youmayneedtoinstallthedevelopmentpackage.]png:no[pkg-configinformationfor'libpng'couldnotbefound.]qhull:yes[pkg-configinformationfor'qhull'couldnotbefound.Usinglocalcopy.]OPTIONALSUBPACKAGESsample_data:yes[installing]toolkits:yes[installing]tests:no[skippingduetoconfiguration]toolkits_tests:no[skippingduetoconfiguration]OPTIONALBACKENDEXTENSIONSmacosx:no[MacOS-Xonly]qt5agg:no[PyQt5notfound]qt4agg:no[PySidenotfound;PyQt4notfound]gtk3agg:yes[installing,version3.2.4]gtk3cairo:yes[installing,version3.2.4]gtkagg:no[TheC/C++headerforgtk(gtk/gtk.h)couldnotbefound.Youmayneedtoinstallthedevelopmentpackage.]tkagg:yes[installing;run-timeloadingfromPythonTcl/Tk]wxagg:no[requireswxPython]gtk:no[TheC/C++headerforgtk(gtk/gtk.h)couldnotbefound.Youmayneedtoinstallthedevelopmentpackage.]agg:yes[installing]cairo:yes[installing,pycairoversion1.8.8]windowing:no[MicrosoftWindowsonly]OPTIONALLATEXDEPENDENCIESdvipng:noghostscript:yes[version9.05]latex:nopdftops:yes[version0.18.4]OPTIONALPACKAGEDATAdlls:no[skippingduetoconfiguration]============================================================================*Thefollowingrequiredpackagescannotbebuilt:*freetype,png----------------------------------------Command"pythonsetup.pyegg_info"failedwitherrorcode1in/tmp/pip-build-xxOWwU/matplotlib/pip我已經更新到最新版本了:pipinstall--upgradepip求大神帮忙看看,怎么解决!
查看完整描述

2 回答

?
呼唤远方

TA贡献1856条经验 获得超11个赞

一般建议你使用apt-get进行安装可以省很多的事情,直接使用:
apt-getinstallpython-matplotlib
它会自动解决一些依赖包,实际上使用pip安装有一些C库比如jpeg、png你要安装后才可以正常安装成功的。
                            
查看完整回答
反对 回复 2019-05-25
  • 2 回答
  • 0 关注
  • 2807 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信