
1、依次点击【File】---【Setting】---【Editor】---【File Encoding】页面,设置global 和project encoding为UTF-8


2、依次点击【File】---【Setting】---【Editor】---【File and Code Templates】,点击右边的【python script】,在编辑框中输入:#-*-coding:utf-8-*-,保存设置

3、重启pycharm即可
相关文章教程推荐:pycharm教程

1、依次点击【File】---【Setting】---【Editor】---【File Encoding】页面,设置global 和project encoding为UTF-8


2、依次点击【File】---【Setting】---【Editor】---【File and Code Templates】,点击右边的【python script】,在编辑框中输入:#-*-coding:utf-8-*-,保存设置

3、重启pycharm即可
相关文章教程推荐:pycharm教程
© 2021 Python学习网 苏ICP备16018502号-40