python编译报错: SyntaxError: Non-ASCII character ‘\xe8’ in file xxx原因是不支持中文注释,如这种中英文混杂注释: # Subtract off the mean and divide by the variance of the pixels.#减去平均值并除以像素的方差 解决办法: 在文件第一行加上 #encoding:utf
如果python(2.x)脚本中带有中文,则会报错: SyntaxError: Non-ASCII character '\xe8' in file demo.py on line 7, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details 原因是而Python 2.x支持的 ASCII