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

python学习网 2019-11-04 11:03:04

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

 

 

 

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

方法二:更改编码格式

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

 

 

阅读(2252) 评论(0)