打开设置,在扩展里找到Run Code configuration ,打开如图所示setting.json文件。 修改编码格式,换成以下: set PYTHONIOENCODING=utf8 && python 成功解决