File "E:\IDE\Python2.7.12\workspace\hello.py", line 1
SyntaxError: Non-ASCII character '\xb2' in file E:\IDE\Python2.7.12\workspace\hello.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
1.SyntaxError: Non-ASCII character '\xe2' in file意思是说,在文件中存在非ASCII字符;
2.ASCII是8位即一个字符,一共256个字符,随着计算机的发展,现在已经用到2个或者4个字符;
3.最重要的原因就是文件中有中文
建议在文件头追加:
# -*- coding: cp936 -*-
或者
# -*- coding: utf-8 -*