반응형

 

 

파이썬을 다시 사용해보려던 차에 버전이랑 설치 경로를 까먹어서 찾아본 김에 적어봄

 

 

1. 설치한 파이썬 버전 확인하는 법

1) cmd에서 파이썬 버전을 확인하는 법

C:\Users\Username>python --version

 

cmd 창 입력 예시

 

2) python 인터프리터에서 버전 확인하는 법

C:\Users\Username>python
import sys
print(sys.version)

cmd에 python을 입력하면 파이썬 인터프리터로 넘어감

 

파이썬 인터프리터 입력 예시

 

위의 2가지 방법으로 내가 설치한 파이썬 버전3.8.2인것을 알수있다

 

 

2. 파이썬 설치된 경로 확인하는 법

 

 

1) cmd에서 파이썬 설치 경로를 확인하는 법

C:\Users\Username\where python

 

cmd에서 입력 예시

 

2) python 인터프리터에서 설치 경로를 확인하는 법

C:\Users\Username>python
import os
import sys
os.path.dirname(sys.executable)

 

python interpreter 입력 예시

 

 

 

 

 

출처 : 스택오버플로우

 

How can I find where Python is installed on Windows?

I want to find out my Python installation path on Windows. For example: C:\Python25 How can I find where Python is installed?

stackoverflow.com

 

 

 

Which version of Python do I have installed?

I have to run a Python script on a Windows server. How can I know which version of Python I have, and does it even really matter? I was thinking of updating to the latest version of Python.

stackoverflow.com

 

 

 

How do I check what version of Python is running my script?

How can I check what version of the Python Interpreter is interpreting my script?

stackoverflow.com

 

 

※오타가 있을 수 있으니 그런 경우 이미지를 참고해주시길 바랍니다.

반응형

+ Recent posts