리눅스 Python 2.6 설치

리눅스 Python 2.6 설치하기 (make)

1 다운로드[ | ]

[root@localhost ~]# wget python.org/ftp/python/2.6.6/Python-2.6.6.tgz
--2012-02-23 08:59:42--  http://python.org/ftp/python/2.6.6/Python-2.6.6.tgz
Resolving python.org... 82.94.164.162, 2001:888:2000:d::a2
Connecting to python.org|82.94.164.162|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13318547 (13M) [application/x-tar]
Saving to: `Python-2.6.6.tgz'

100%[============================================================================================================>] 13,318,547   159K/s   in 88s     

2012-02-23 09:01:11 (149 KB/s) - `Python-2.6.6.tgz' saved [13318547/13318547]

2 압축 해제[ | ]

[root@localhost ~]# tar -zxvf Python-2.6.6.tgz
Python-2.6.6/
Python-2.6.6/Lib/
Python-2.6.6/Lib/genericpath.py
Python-2.6.6/Lib/textwrap.py
...(생략)
Python-2.6.6/Grammar/Grammar
Python-2.6.6/install-sh

3 컴파일[ | ]

[root@localhost ~]# cd Python-2.6.6
[root@localhost Python-2.6.6]# ./configure && make && make install
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... linux2
... (생략)

4 버전 확인[ | ]

  • 설치(컴파일) 직후에는 구버전으로 연결될 수 있다. 이때는 Terminal을 재시작하면 파이썬이 2.6.6 버전으로 연결된다.
[root@localhost ~]# whereis python
python: /usr/bin/python2.4 /usr/bin/python /usr/lib/python2.4 /usr/local/bin/python2.6 /usr/local/bin/python2.6-config /usr/local/bin/python /usr/local/lib/python2.6 /usr/include/python2.4 /usr/share/man/man1/python.1.gz
[root@localhost ~]# python -V
Python 2.6.6

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}