matplotlib报错:AttributeError: Unknown property wrap

在Ubuntu 14.04环境下,使用python2.7运行matplotlib demo时遇到AttributeError,由于系统自带matplotlib版本为1.3.1,不支持wrap属性。参考Stack Overflow解答,了解到问题在于matplotlib版本低于1.5。通过手动下载并安装matplotlib 1.5.1解决此问题,详细步骤包括下载源码、解压、运行build和install命令。
摘要由CSDN通过智能技术生成

环境:ubuntu14.04, python2.7

在运行demo时报错:http://matplotlib.org/examples/text_labels_and_annotations/autowrap_demo.html

查找到原因:http://stackoverflow.com/questions/34375618/the-use-of-kwarg-wrap-for-a-pyplot-text-artist-in-matplotlib

“You are not using 1.5 if the keyword is not working”

自己查了下版本:

>>> import  matplotlib
>>> matplotlib.__version__
'1.3.1'

果然版本太低


之前是用命令sudo apt-get install python-matplotlib来安装的,查了下,发现ubuntu14.04的python-matplotlib包是1.3的,要到ubuntu16.04才升级到1.5

所以,只能手动安装matplotlib

教程(未测试):http://www.cnblogs.co

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值