【发布时间】:2015-11-18 23:24:52
【问题描述】:
每次我import pandas 时都会收到来自matplotlib 的警告:
/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py:872: UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.
warnings.warn(self.msg_depr % (key, alt_key))
抑制它的最佳方法是什么?所有软件包都是最新的。
Conf:OSX 与 brew Python 2.7.10(默认,2015 年 7 月 13 日,12:05:58),以及 pandas==0.17.0 和 matplotlib==1.5.0
【问题讨论】:
-
你的linux操作系统名称和版本是什么,python版本是什么,matplotlib版本是什么,你的pandas版本是什么?
-
也许可以试试this?我无法测试它,因为我没有收到相同的警告..
-
我在 OSX 上使用 brew Python 2.7.10(默认,2015 年 7 月 13 日,12:05:58)和 pandas==0.17.0 和 matplotlib==1.5.0
-
看看*.com/questions/16170989/…:建议使用
matplotlib.use(arg, warn=False, force=False)。见matplotlib.org/api/matplotlib_configuration_api.html首先从matplotlib导入使用,然后调用matplotlib.use(),再从matplotlib导入*。
标签: python pandas matplotlib warnings