CentOS 6.5에서 Python 업그레이드 방법 (2.6 -> 2.7)

개요

CentOS 6.5에는 Python 2.6.6 버전이 설치되어 있다. 이를 Python 2.7.6으로 업그레이드 하는 방법이 “How to install Python 2.7 and Python 3.3 on CentOS 6“에 잘 정리되어 있다. 

요약

1. 필수 라이브러리 설치

 
# yum groupinstall “Development tools”
 
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
 
cs

2. Python 2.7.6 설치

 
# wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
 
# tar xf Python-2.7.6.tar.xz
 
# cd Python-2.7.6
 
# ./configure –prefix=/usr/local –enable-unicode=ucs4 –enable-shared LDFLAGS=”-Wl,-rpath /usr/local/lib”
 
# make && make altinstall
 
cs

3. setuptools와 pip 설치

 
# wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py : 링크 깨짐
# wget https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py
 
# python2.7 ez_setup.py
 
# easy_install-2.7 pip
 
cs

4. virtualenv 설치 및 활성화

 
# pip2.7 install virtualenv
 
# virtualenv catnap
 
# source catnap/bin/activate
 
cs

댓글 달기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

위로 스크롤