pycharm 使用中注意事项

设置 py 文件存储的格式为 UTF-8

置 py 文件存储的格式为 UTF-8,否则会出现类似以下错误信息:

SyntaxError: (unicode error) utf-8 codec cant decode byte 0xc4 in position 0:
invalid continuation byte

  • 进入 file > Settings,在输入框搜索 encoding
  • 找到 Editor > File encodings,将 Global Encoding、Project Encoding、Default encoding for properties files 设置为utf-8。

 

Create Interpreter 时:如果报错

Error: Standard Python 'venv' module not found

在当前工程下执行命令: 

virtualenv venv

 

 

posted @ 2019-06-24 09:16  糊涂小农  阅读(1137)  评论(0)    收藏  举报