SyntaxError: Non-UTF-8 code starting with ‘\xc4‘ in file E:/7.python/day3/easyguis.py on line 2

关于python使用easygui出现

SyntaxError: Non-UTF-8 code starting with '\xc1' in file C:\...\xxx.py on line 8, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

解决方法:在最上面加上#coding: utf-8 即可运行。代码如下:

#coding: utf-8
import easygui
easygui.msgbox('你好世界')

SyntaxError: Non-UTF-8 code starting with ‘\xc4‘ in file E:/7.python/day3/easyguis.py on line 2_第1张图片

你可能感兴趣的:(笔记,python,easygui,python,easygui)