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