两种方法可以在python运行代码的时候不显示warning输出 方法1: import warnings warnings.filterwarnings('ignore') 方法2: python -W ignore run.py