添加代码 import sys import codecs sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) 转载于:https://www.cnblogs.com/liangxc/p/10228027.html