在python文件中加上以下代码: import io import sys sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf-8')