头部添加三行代码: import codecs sys.dont_write_bytecode = True sys.stdout=codecs.getwriter("utf-8")(sys.stdout.detach())