Python 中文报错 SyntaxError: NonASCII character解决办法 只需要在最顶部的位置加上 1 #-*- coding:utf-8 -*- 就行了。 如果还是没有好,打开设置并搜索file encoding并作如图修改便好。