파이썬을 다시 사용해보려던 차에 버전이랑 설치 경로를 까먹어서 찾아본 김에 적어봄
1. 설치한 파이썬 버전 확인하는 법
1) cmd에서 파이썬 버전을 확인하는 법
C:\Users\Username>python --version
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
2) python 인터프리터에서 설치 경로를 확인하는 법
C:\Users\Username>python
import os
import sys
os.path.dirname(sys.executable)
출처 : 스택오버플로우
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
※오타가 있을 수 있으니 그런 경우 이미지를 참고해주시길 바랍니다.
'파이썬' 카테고리의 다른 글
[python] 파이썬 크롬 자동화 예제 (selenium #1) (0) | 2021.12.14 |
---|---|
[python] 파이썬 에러 TypeError: can only concatenate str (not "Tag") to str (0) | 2021.12.10 |
[python] 파이썬 에러 TypeError: write() argument must be str (0) | 2021.11.27 |
[python] 파이썬 윈도우 설치 방법과 환경변수 세팅 (0) | 2021.11.25 |