pycharm 使用中注意事项
设置 py 文件存储的格式为 UTF-8
置 py 文件存储的格式为 UTF-8,否则会出现类似以下错误信息:
SyntaxError: (unicode error) ‘utf-8’ codec can’t 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

博客地址迁移,博客目前更新在 csdn: https://blog.csdn.net/H_Rhui

浙公网安备 33010602011771号