去掉python的警告

1.常规警告
import warnings
warnings.filterwarnings("ignore")

 

2.安装gensim,在python中导入的时候出现一个警告:

warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
UserWarning: detected Windows; aliasing chunkize to chunkize_serial

解决方法:输入下面两条语句即可:

import warnings
warnings.filterwarnings(action='ignore',category=UserWarning,module='gensim')

  

posted @ 2018-12-27 21:14  nxf_rabbit75  阅读(3431)  评论(0编辑  收藏  举报