본문 바로가기

programmer/python

python 설치와 Hello World!

python 설치와 Hello World!




안녕하세요. 오늘은 윈도우에 python(파이썬) 설치하는 방법을 알아보겠습니다.

.



python 다운로드를 위해서 https://www.python.org/downloads/ 이곳으로 이동해주세요.


enter image description here


위의 페이지에서 Download Python 3.5.1을 눌러 설치 파일을 다운로드 받습니다. 그리고 설치파일을 실행시킵니다.


enter image description here


그러면 위와 같이 실행이 되는데요. install now를 눌러서 바로 파이썬을 설치할 수도 있고 Customize installation을 눌러서 경로와 설정 등을 지정할 수 있습니다. 중요한 것은 지금 화면에서 아래에 있는 Add Python 3.5 to Path에 체크해주시는 것입니다.


enter image description here


위의 그림처럼 체크!


install now를 하면 바로 설치가 시작되고요. 저는 경로를 다른 곳으로 설정하기 위해 Customize installation을 눌렀습니다.


enter image description here


next를 누릅니다.


enter image description here


맨 위에 install for all users를 체크하고 적당한 경로를 설정한 후에 Next를 누릅니다.


enter image description here


설치가 진행됩니다. 설치가 완료되면 환경 변수의 Path가 잘 설정되었는지 확인해봅시다.


enter image description here


폴더 하나를 열고 왼쪽에 내 PC를 오른쪽 클릭한 후 속성을 누릅니다.


enter image description here


고급 시스템 설정을 누릅니다.


enter image description here


고급 탭에서 환경변수를 누릅니다.


enter image description here


시스템 변수 목록에서 Path를 찾아 편집을 누릅니다.


enter image description here


제가 설치했던 경로로 Path가 추가되어있는 것을 확인할 수 있습니다!


이제 python을 실행시켜 보겠습니다. 명령 프롬프트를 열고 python이라고 입력해봅니다.


enter image description here


위의 사진처럼 나오면 정상적으로 설치된 것입니다.


enter image description here


print(“Hello, world!!!”)를 입력해서 Hello, world!!!를 출력해보았습니다.


지금까지 python 설치와 Hello world 출력하는 것을 알아보았습니다.