import sys reload(sys) sys.setdefaultencoding('utf8') 转载于:https://www.cnblogs.com/TLightSky/p/3714073.html