File "1.py", line 2
SyntaxError: Non-ASCII character '\xe5' in file 1.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
原因是:Python默認是以ASCII作為編碼方式的,需要在文件開頭設置一下編碼
# -*- coding: UTF-8 -*- 或者 #coding=utf-8