文章目录 背景原因解决 背景 在写python程序时,有时会给出很多warning信息,虽然不会影响程序正常运行,但是影响显示效果。 原因 未知。 解决 加入下面两行代码即可 import warnings warnings.filterwarnings('ignore') # 不发出警告