解决方法: 在Python程序最前面加上以下语句: import sys reload(sys) sys.setdefaultencoding('utf-8') 转载于:https://www.cnblogs.com/sea-stream/p/10836056.html