반응형
기존 tasks.json>
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Project Label",
"type": "shell",
"command": "python",
"args": ["${file}"],
"presentation": {
"reveal": "always",
"panel": "new"
},
"options": {
"env": {
"PYTHONIOENCODING": "UTF-8"
}
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
수정 tasks.json>
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "python3 venv",
"command": "${config:python.pythonPath}",
"args": ["${file}"],
//"isShellCommand": true,
"type": "shell",
"options": {
"env": {
"PYTHONIOENCODING": "UTF-8"
}
},
//"showOutput": "always",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
수정 사유>
기존 tasks.json에서 ModuleNotFoundError: No module named 'requests' 에러가 지속 발생
requests가 설치 되어있으나 에러가 나옴.
결국은 가상환경설정을 찾지못하는 경우이니 조금 수정후에 사용.
반응형
'Python_Beginer > VSCODE' 카테고리의 다른 글
[단축키]유용한 단축키 (0) | 2020.07.31 |
---|---|
[VSCODE]12 Recommended Expansion Packs (0) | 2019.11.18 |
[VSCODE]PIP Error 해결 방법 (0) | 2019.11.16 |
[VSCODE]영문 -> 한글 (한글화) (0) | 2019.11.02 |