갈루아의 반서재

728x90

설치된 버전을 확인힌다.

[root@jpalace root]# python

[root@jpalace root]# Python 2.2.2 (#1, Feb 24 2003, 19:13:11) // 버전 2.2.2 가 설치되어 있다

[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

파이썬 2.7을 다운로드하여 설치한다

[root@jpalace root]# wget http://python.org/ftp/python/2.7/Python-2.7.tgz
[root@jpalace root]# tar xzf Python-2.7.tgz
[root@jpalace root]# cd Python-2.7
[root@jpalace root]# ./configure
[root@jpalace root]# make
[root@jpalace root]# make altinstall
심볼릭 링크 해제
(구버전은 python_old로 이름을 바꾸고 신버전을 python이라는 이름으로 복사하여 새로 설치된 2.7 버전을 향하도록 한다)
[root@jpalace root]# python -V
Python 2.2.2
[root@jpalace /]# ll /usr/bin/python*
-rwxr-xr-x    2 root     root       791232  2▒▒ 25  2003 /usr/bin/python
lrwxrwxrwx    1 root     root            6  4▒▒  4  2005 /usr/bin/python2 -> python
-rwxr-xr-x    2 root     root       791232  2▒▒ 25  2003 /usr/bin/python2.2
[root@jpalace /]# /usr/bin/python -V
Python 2.2.2
[root@jpalace /]# /usr/local/bin/python2.7 -V
Python 2.7
[root@jpalace /]# mv /usr/bin/python /usr/bin/python_old
[root@jpalace /]# cp /usr/local/bin/python2.7 /usr/bin/python
[root@jpalace /]# python -V
Python 2.7
[root@jpalace /]# python
Python 2.7 (r27:82500, Dec 10 2014, 16:41:56)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>



728x90