文章目录
一、报错信息
二、解决方案
一、报错信息
Y:\002_WorkSpace\PycharmProjects\APK\venv\Scripts\python.exe Y:/002_WorkSpace/PycharmProjects/APK/main.py File "Y:/002_WorkSpace/PycharmProjects/APK/main.py", line 1 SyntaxError: Non-ASCII character '\xe5' in file Y:/002_WorkSpace/PycharmProjects/APK/main.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details Process finished with exit code 1
二、解决方案
在代码第一行添加 如下内容 :
# coding=utf-8
添加了 # coding=utf-8 后 , Python 程序可运行 ;