출처 : https://github.com/h2oai/h2o-2/wiki/installing-python-2.7-on-centos-6.3.-follow-this-sequence-exactly-for-centos-machine-only
세부 사항은 출처 참고.
yum install -y centos-release-SCL
yum install -y python27
Okay for centos 6.4 also On apu.0xdata.loc, after this install was done
$ which python
/usr/local/bin/python
$ python -V
Python 2.7.3
$ ls -ltr /usr/local/bin/pyth*
lrwxrwxrwx 1 root root 24 Jan 30 2013 /usr/local/bin/python -> /usr/local/bin/python2.7
-rwxr-xr-x 1 root root 6162289 Sep 3 00:59 /usr/local/bin/python2.7
-rwxr-xr-x 1 root root 1624 Sep 3 01:00 /usr/local/bin/python2.7-config
So yum will use '/usr/bin/python' which is 2.6
$ /usr/bin/python -V
Python 2.6.6
"python" will give you python 2.7.
"python2.7" will give you python 2.7.
"easy_install" and "easy_install-2.7" will easy install for python 2.7. While separate files, they both seem to install into /usr/local/lib/python2.7/site-packages/
$ ls -ltr /usr/local/bin | grep easy_
-rwxr-xr-x 1 root root 340 Jan 30 2013 easy_install-2.7
-rwxr-xr-x 1 root root 332 Jan 30 2013 easy_install
note the dash before the 2.7
The easy_install's in /usr/bin are for 2.6
$ ls -ltr /usr/bin/easy*
-rwxr-xr-x. 1 root root 331 Nov 11 2010 /usr/bin/easy_install-2.6
-rwxr-xr-x. 1 root root 323 Nov 11 2010 /usr/bin/easy_install
I would recommend python 2.7 on all local machines
I suspect everyone is already ok?. To check:
[root@apu etc]# python -V
Python 2.7.3
PIP랑 YUM 확인 필요... --> 출처 링크 참조..
아님그냥 pyenv 쓰자.
'Linux' 카테고리의 다른 글
확장자 바꾸기, Bash에서 확장자 일괄 변환하기, 파일명 확장자 분리하기 (0) | 2017.04.09 |
---|---|
systemd에서 부팅시 실행할 서비스 관리하기 (CentOS 7) (0) | 2016.10.25 |
Mac에서 한글 파일명을 Linux에서 안깨지도록 변환 해보자 (0) | 2016.03.19 |
Kali Linux add PPA repository add-apt-repository (0) | 2014.11.26 |
Linux Virtual Device (0) | 2014.07.31 |