import sys reload(sys) sys.setdefaultencoding('utf-8') 转载于:https://www.cnblogs.com/HeJD/p/8702021.html