python 설치 프로그램 다운로드하기
위 링크를 클릭하여 최신 버전의 python을 선택하여 다운로드 합니다.
Python 최신 버전 설치하기 (Windows OS 64bit 버전)
이 글에서는 (64bit) python-3.9.2-amd64.exe를 다운로드해서 설치하는 방법은 소개 하겠습니다. 다운로드한 파일을 선택 해서 실행합니다. python3.9.2보다 더 최신 버전이 나왔으면 최신 버전을 다운로드하십시오.

다음과 같은 대화 상자가 표시되면 [예] 를 클릭합니다.

설치 프로그램이 시작하면 다음 화면을 표시합니다.[Add Python 3.9 to PATH] 를 체크합니다. [Add Python 3.9 to PATH]를 체크하는 것을 잊지 않도록 하십시오. 만약 잊었다면 다시 설치 하십시오. 여러 번 반복 해도 괜찮습니다.
[Install now] 를 클릭하여 설치를 시작합니다.

설치가 시작되면 진행 상태를 표시하는 화면을 표시합니다. 끝날 때까지 기다리십시오.

설치가 종료되면 다음 화면을 표시합니다. [Disable path length limit]를 클릭하여 path 글자 수 제한을 없앱니다.

최종 설치 화면은 다음과 같습니다. [Close]를 클릭 해 설치 종료 화면을 닫습니다.

실행 방법 – 명령 프롬프트 – python.exe
[Windows 시스템]의 [명령 프롬프트]를 선택합니다.

다음과 같이 [명령 프롬프트]가 표시됩니다. 여기에서 python 또는 python.exe 을 입력하고 [ENTER] 키를 누르면 Python을 시작할 수 있습니다. 시작되면 print (‘Hello World’)을 입력하여 봅시다. 실행 결과 Hello World가 출력 되는 것을 확인 할 수 있습니다.
Python을 종료 할 때는 quit() or exit()를 입력하거나 [Ctrl + Z ] 키를 누릅니다.

Python을 종료 할 때 잘못된 명령을 입력하면 다음과 같은 메시지가 표시 됩니다.
>>>exit Use exit() or Ctrl-Z plus Return to exit
실행 방법 – 명령 프롬프트 – py.exe
Windows 용 Python에서는 python.exe 명령을 사용하는 것보다, Python Launcher py.exe 를 추천합니다. 일반적으로 Python을 명령 줄에서 실행하는 경우에는 Python을 설치 한 디렉토리를 시스템 환경 변수에 등록해야 하지만 py.exe 는 설정을 하지 않아도 실행할 수 있습니다.
py.exe 은 보통 python 명령처럼 python을 실행할 수 있습니다. [명령 프롬프트]에서 py 또는 py.exe을 입력하고 [엔터] 키를 누릅니다.
C:\Users\admin>py Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> print('Hello World') Hello World >>>
여러 버전의 Python이 설치되어있는 경우, py 명령은 최신의 Python을 실행합니다.
C:\Users\admin>py Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
또한 py -3.9 처럼 Python의 버전을 지정하여 실행할 수 있습니다.
C:\Users\admin>py -3.9 Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
설치되지 않은 Python의 버전을 지정하여 실행하면 다음과 같이 찾을 수 없다는 메시지를 표시하고 실행을 종료합니다.
C:\Users\admin>py -3.6 Python 3.6 not found! Installed Pythons found by py Launcher for Windows-3.9-64 * Requested Python version (3.6) not installed, use -0 for available pythons
실행 방법 – Google Colap
다음 글을 참조 하십시오.

댓글