PyCharm注释中出现中文运行报错的解决办法

SyntaxError: Non-UTF-8 code starting with '…

PyCharm注释中出现中文运行报错的解决办法

方法一:在文件首行加上    # -- coding:utf-8 --

方法二:更改编码格式

File  -->  Settings  -->  Editor  -->  File Encodings  全改为UTF-8就可以了

PyCharm注释中出现中文运行报错的解决办法

路漫漫其修远兮,吾将上下而求索

相关文章: