Mac에서 Python 설정

Mac에서 Python 설정

내 /usr/bin에는 다음 Python 설치가 포함되어 있습니다.

lrwxr-xr-x  1 root  wheel     76 Nov 18 06:17 pythonw2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7
lrwxr-xr-x  1 root  wheel     76 Nov 18 06:17 pythonw2.6 -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw2.6
lrwxr-xr-x  1 root  wheel     76 Nov 18 06:17 pythonw2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/pythonw2.5
-rwxr-xr-x  2 root  wheel  62752 Nov 18 06:17 pythonw
lrwxr-xr-x  1 root  wheel     82 Nov 18 06:17 python2.7-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
lrwxr-xr-x  1 root  wheel     75 Nov 18 06:17 python2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
lrwxr-xr-x  1 root  wheel     82 Nov 18 06:17 python2.6-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6-config
lrwxr-xr-x  1 root  wheel     75 Nov 18 06:17 python2.6 -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6
lrwxr-xr-x  1 root  wheel     82 Nov 18 06:17 python2.5-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5-config
lrwxr-xr-x  1 root  wheel     75 Nov 18 06:17 python2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5
-rwxr-xr-x  6 root  wheel    925 Nov 18 06:17 python-config
-rwxr-xr-x  2 root  wheel  62752 Nov 18 06:17 python
lrwxr-xr-x  1 root  wheel     63 Mar  6 13:23 python3.2 -> /Library/Frameworks/Python.framework/Versions/3.2/bin/python3.2

나는 Python이 설치된 모든 버전에 대한 링크가 될 것이라고 생각했지만 그렇지 않습니다. Python 실행 파일인 것 같습니다.

15:00:33 /usr/bin $ python -V
Python 2.7.1

다른 설치에서도 동일한 버전이 표시됩니다.

15:01:36 /usr/bin $ pythonw2.7 -V
Python 2.7.1

하지만 체크섬은 동일하지 않습니다.

15:02:15 /usr/bin $ sum python2.7
60959 35 python2.7

15:03:18 /usr/bin $ sum python
10360 62 python

궁금해요.. 실제로 가능할까요?

rm python
ln -s python3.2 python

시스템: MAC

답변1

삭제하는 대신 이름을 바꾸면 어떨까요?

mv python python.original

관련 정보