티스토리 뷰

Python

Visual studio code

skyground21 2022. 9. 13. 21:15

Visual studio code

code.visualstudio.com
https://code.visualstudio.com/

 

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

 

Download 클릭

사용하고 있는 OS system에 맞는 것을 찾아 다운로드 한다.


다운로드 파일 실행하면 프로그램을 설치할 수 있다.

사용권 계약 

동의합니다(A)

다음

 

설치 위치 선택

다음

 

시작 메뉴 폴더 선택 > 다음

추가 작업 선택 :

모두 체크

다음

 

설치 준비 완료

설치

 

설치중

 

Visual Studio Code 설치 마법사 완료

종료



메뉴 > Extensions

 

Python검색하여 python extension 설치한다.

 

https://marketplace.visualstudio.com/items?itemName=ms-python.python 

 

Python - Visual Studio Marketplace

Extension for Visual Studio Code - IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), Jupyter Notebooks, code formatting, refactoring, unit tests, and more.

marketplace.visualstudio.com

 

Install 클릭

 

Visual Studio Code를 실행 시키게 되고

 

Visual Studio Code프로그램에 Extension: Python 설치 창이 뜬다.]

Install  클릭


EXPLORER
Open Folder 설정
C:₩jocoding(사용자 임의 폴더)

 

yes, I trust the authors 클릭



File > New File 클릭


hello.py 저장

 

print("hello")

 


재생버튼이 안 보이는 경우는 Python extension이 제대로 설치 되지 않아서 이니 다시 설치하기 바람

우측 하단에 파이선 버전(3.10.7 64-bit) 클릭하면 연결된 파이선 버전이 나온다.



인터프리터 경로 입력(Enter interpreter path) 클릭
찾기(Find) 클릭
탐색기를 통해 Python이 설치된 폴더
C:\Program Files\Python310\python.exe
인터프리터 선택(Select interpreter) 클릭

 


Select default terminal profile

 

Command prompt 클릭

cmd창을 default 설정하게 된다.

 

TERMINAL에서 python hello.py 엔터

하면 아래와 같이 hello를 출력해 준다. 이렇게 되면 설정이 잘 된것이다.

 

Python이렇게 나오면 path연결이 잘 안된 것이니 환경변수 설정을 다시 하시고 재부팅을 하시면 됩니다.

환경설정하는 방법

 

https://code.visualstudio.com/learn

 

Get Started with Visual Studio Code

Get Started with Visual Studio Code

code.visualstudio.com

 

반응형
LIST

'Python' 카테고리의 다른 글

Python path연결하기  (0) 2022.09.13
hello python  (0) 2022.09.13
meccanismocomplesso  (0) 2022.05.13
3D Rotations and Euler angles in python  (0) 2022.05.13
Python for Excel Example code  (0) 2022.03.27