在文件头部添加 刻解决 import sys reload(sys) sys.setdefaultencoding("utf-8") 转载于:https://www.cnblogs.com/TomCzr/p/5839470.html