【问题标题】:DeprecationWarning with matplotlib and dateutil使用 matplotlib 和 dateutil 的 DeprecationWarning
【发布时间】:2016-03-16 10:33:01
【问题描述】:
由于我安装了最新版本的 matplotlib (1.5.1),当我尝试使用 datetime 作为 X 绘制值时出现以下错误。
DeprecationWarning:同时使用 'count' 和 'until' 不一致
使用 RFC 2445 并已在 dateutil 中弃用。未来版本
将引发错误。
是否有人遇到过这个错误,并且知道如何纠正它?
【问题讨论】:
标签:
python
datetime
matplotlib
python-dateutil
【解决方案1】:
该问题已在 matplotlib 上修复,但未在最终版本中发布 (>= 1.5.2)
我必须安装当前的工作版本
pip install git+https://github.com/matplotlib/matplotlib
【解决方案2】:
首先这不是错误。这是一个警告。
其次,很可能问题不是您的问题,而是 Matplotlib 中的问题,需要修复它们如何从 python-dateutil 调用函数或某种方法。很可能,您可以忽略此警告,它将在下一个 Matplotlib 版本中修复。
【解决方案3】:
最佳解决方案:
在文件/matplotlib/dates.py,第830行:
self.rule.set(dtstart=start, until=stop, count=self.MAXTICKS + 1)
需要评论