Contents
  1. 1. 1. vscode下python print 输出乱码
  2. 2. 2. python 运行配置

1. vscode下python print 输出乱码

在task文件中加入环境变量,然后问题解决。

1
2
3
4
5
"options": {
"env":{
"PYTHONIOENCODING": "UTF-8"
}
}

2. python 运行配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"version": "0.1.0",
"command": "python",
"windows": {
"command": "D:\\develop\\running\\Python35\\python.exe" //python的安装路径
},
"isShellCommand": true,
"args": [
"${file}"
],
"showOutput": "always",
"options": {
"env": {
"PYTHONIOENCODING": "UTF-8"
}
}
}
Contents
  1. 1. 1. vscode下python print 输出乱码
  2. 2. 2. python 运行配置