참조
mooonchivekr.blogspot.com/2019/10/ubuntu-1804-lts-visual-studio-code-c.html
'ctrl + shift + p' 를 누르고 적당히 'select interpreter' 를 치면 관련된 옵션이 뜨며 클릭 후 tf_cpu python을 선택하면 됨.
그러면 .vscode 하위 디렉토리에 setting.json이라는 파일이 생성된다.
즉, 굳이 위 과정을 거치지 않아도 setting.json 파일의 "python.pythonPath"만 적절히 수정해주면 우리가 원하는 경로의 python을 interpreter로 설정할 수 있다.
이제 마지막으로 코드를 실행 시켜볼텐데, 코드 바탕에서 오른쪽 클릭 후 "Run Python File in Terminal"을 클릭하면 하단에 embedded console에 결과가 출력된다.
Ctrl + F5(Run -> Run Without Debugging) 를 눌러도 실행되는데,불필요한 것들도 출력이 되서 문제
참고
[ Select Linter ] - 나는 잘 모르겠음
Python Coding Style을 검사할 엔진(?)을 고르는 것이다.
위에 나오는 화면에서 "Select Linter"를 선택하거나
[Ctrl + Shift + P]를 눌러서 나오는 화면에서 "Linter" 타이핑해서
"Python: Select Linter"를 선택하자.
출처: https://www.whatwant.com/entry/Visual-Studio-Code-for-Python-VSCode-Python-개발환경-만들기 [머가필요해]
'IT > PYTHON' 카테고리의 다른 글
numpy 와 python 버전이 안 맞을때 (0) | 2022.03.31 |
---|---|
Celery? (0) | 2021.10.28 |
WSGI란 ? GUNICORN? (0) | 2021.10.28 |
f-strings (문자열 만들기) (0) | 2021.10.01 |
윈도우즈10 에서 scrapy 설치하기 (0) | 2021.09.09 |
댓글