CentOS 7 Python3 및 Anaconda 표준 Library 설치

System Story/Python3 2016.11.25 16:16


최근 IT Trend중 Cloud와 Big Data 분야에서 자동화 및 분석도구로서 다시 주목받고 있는 Script 언어인 Python3 에 대해서 알아보고자 한다.


우선 CentOS7 Version에서 제공하는 Python 3 및 Python 표준 라이브러리 Anaconda (Linux Installer 아님) 설치 방법에 대하여 알아보자.



1. CentOS7 (RHEL7)에 EPEL Repository 설정

 

[root@centos7 /]#

[root@centos7 /]#

[root@centos7 /]# cd /usr/local/src

[root@centos7 src]# 

[root@centos7 src]# 

[root@centos7 src]# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

--2016-02-05 04:00:03--  http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.26, 209.132.181.24, 209.132.181.25, ...

Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.26|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 14524 (14K) [application/x-rpm]

Saving to: ‘epel-release-7-5.noarch.rpm’


100%[=======================================================================================================>] 14,524      74.4KB/s   in 0.2s   


2016-02-05 04:00:04 (74.4 KB/s) - ‘epel-release-7-5.noarch.rpm’ saved [14524/14524]


[root@centos7 src]# 

[root@centos7 src]# 

[root@centos7 src]# ls -lrt

total 16

-rw-r--r--. 1 root root 14524 Nov 25  2014 epel-release-7-5.noarch.rpm

[root@centos7 src]# 

[root@centos7 src]# 

[root@centos7 src]# rpm -ivh epel-release-7-5.noarch.rpm

warning: epel-release-7-5.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:epel-release-7-5                 ################################# [100%]

[root@centos7 src]# 

[root@centos7 src]# 

[root@centos7 src]# 

[root@centos7 src]# rpm -qa | grep epel

epel-release-7-5.noarch

[root@centos7 src]# 

[root@centos7 src]# 

[root@centos7 src]# rpm -qi epel-release-7-5.noarch

Name        : epel-release

Version     : 7

Release     : 5

Architecture: noarch

Install Date: Fri 05 Feb 2016 04:00:32 AM EST

Group       : System Environment/Base

Size        : 24914

License     : GPLv2

Signature   : RSA/SHA256, Tue 25 Nov 2014 01:06:15 PM EST, Key ID 6a2faea2352c64e5

Source RPM  : epel-release-7-5.src.rpm

Build Date  : Tue 25 Nov 2014 11:26:18 AM EST

Build Host  : buildvm-21.phx2.fedoraproject.org

Relocations : (not relocatable)

Packager    : Fedora Project

Vendor      : Fedora Project

URL         : http://download.fedoraproject.org/pub/epel

Summary     : Extra Packages for Enterprise Linux repository configuration

Description :

This package contains the Extra Packages for Enterprise Linux (EPEL) repository

GPG key as well as configuration for yum.

[root@centos7 src]# 

[root@centos7 src]# 

[root@centos7 src]# 

[root@centos7 ~]# 

[root@centos7 ~]# 
[root@centos7 ~]# yum repolist
Loaded plugins: fastestmirror, langpacks      
Loading mirror speeds from cached hostfile    
 * base: ftp.kaist.ac.kr                      
 * epel: mirrors.hustunique.com               
 * extras: ftp.kaist.ac.kr                    
 * updates: ftp.kaist.ac.kr                   
repo id                                         repo name                                               status
base/7/x86_64                                   CentOS-7 - Base                                         9,007
epel/x86_64                             Extra Packages for Enterprise Linux 7 - x86_64          9,397
extras/7/x86_64                                 CentOS-7 - Extras                                         191
updates/7/x86_64                              CentOS-7 - Updates                                        550
repolist: 19,145
[root@centos7 ~]# 
[root@centos7 ~]# 
[root@centos7 ~]#

[root@centos7 ~]# yum list | grep -i epel

 * epel: mirrors.hustunique.com

epel-release.noarch                     7-5                            installed

0install.x86_64                         2.10-2.el7                     epel     

2048-cli.x86_64                         0.9-4.git20141214.723738c.el7  epel     

2048-cli-nocurses.x86_64                0.9-4.git20141214.723738c.el7  epel     

2ping.noarch                            2.0-2.el7                      epel     

389-admin.x86_64                        1.1.38-1.el7                   epel     

389-adminutil.x86_64                    1.1.21-2.el7                   epel     

389-adminutil-devel.x86_64              1.1.21-2.el7                   epel     

3proxy.x86_64                           0.7-1.el7                      epel     

3proxy-sysvinit.x86_64                  0.7-1.el7                      epel     

Agda.x86_64                             2.3.2.2-3.el7                  epel     

AntTweakBar.x86_64                      1.16-2.el7                     epel     

AntTweakBar-devel.x86_64                1.16-2.el7                     epel     

BackupPC.x86_64                         3.3.1-1.el7                    epel     

BareBonesBrowserLaunch.noarch           3.1-7.el7                      epel     


... 중략


 

 

2. CentOS Version 별 설치 참고

 

6.x - wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

5.x - wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

 

※ 참고 : https://fedoraproject.org/wiki/EPEL



3. EPEL YUM Repository 를 통한 Python 3 설치


[root@centos7 ~]# 

[root@centos7 ~]# yum -y install python3*


Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * epel: mirror.premi.st

 

 ... 중략

 




4. Anaconda Python Library 설치 및 확인


[root@centos7 ~]# 

[root@centos7 ~]# mkdir -p /root/python3           

[root@centos7 ~]# 

[root@centos7 ~]# cd /root/python3/

[root@centos7 python3]# 

[root@centos7 python3]# 

[root@centos7 python3]# wget https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh


--2016-11-25 20:42:19--  https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh

Resolving repo.continuum.io (repo.continuum.io)... 104.16.19.10, 104.16.18.10, 2400:cb00:2048:1::6810:130a, ...

Connecting to repo.continuum.io (repo.continuum.io)|104.16.19.10|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 478051940 (456M) [application/octet-stream]

Saving to: 'Anaconda3-4.2.0-Linux-x86_64.sh.1'


10% [==================>                                                                    ] 49,749,143  2.89MB/s  eta 2m 15s ^C


... 중략



[root@centos7 python3]# ll

total 516084

-rw-r--r--  1 root root 478051940 Sep 28 05:50 Anaconda3-4.2.0-Linux-x86_64.sh

drwxr-xr-x 20 root root      4096 Nov 25 20:38 anaconda3

[root@centos7 python3]# 


[root@centos7 python3]# 

[root@centos7 python3]# 

[root@centos7 python3]# bash ./Anaconda3-4.2.0-Linux-x86_64.sh 


Welcome to Anaconda3 4.2.0 (by Continuum Analytics, Inc.)


In order to continue the installation process, please review the license

agreement.

Please, press ENTER to continue

>>> 


... 중략



[root@centos7 ~]# 

[root@centos7 ~]# conda list

# packages in environment at /root/python3/anaconda3:

#

_license                  1.1                      py35_1  

_nb_ext_conf              0.3.0                    py35_0  

alabaster                 0.7.9                    py35_0  

anaconda                  4.2.0               np111py35_0  

anaconda-clean            1.0.0                    py35_0  

anaconda-client           1.5.1                    py35_0  

anaconda-navigator        1.3.1                    py35_0  

argcomplete               1.0.0                    py35_1  

astroid                   1.4.7                    py35_0  

astropy                   1.2.1               np111py35_0  

babel                     2.3.4                    py35_0  

backports                 1.0                      py35_0  

beautifulsoup4            4.5.1                    py35_0  

bitarray                  0.8.1                    py35_0  

blaze                     0.10.1                   py35_0  

bokeh                     0.12.2                   py35_0  

boto                      2.42.0                   py35_0  

bottleneck                1.1.0               np111py35_0  

cairo                     1.12.18                       6  


... 중략


※ 참고 : Anaconda Version 별 선택 Download - https://repo.continuum.io/archive/











'System Story > Python3' 카테고리의 다른 글

Python3 연산 및 특징  (0) 2016.11.29
Python3 대화식 인터프리터 실행  (0) 2016.11.29
CentOS 7 Python3 및 Anaconda 표준 Library 설치  (2) 2016.11.25
tags : ,
Trackbacks 0 : Comments 2
  1. 노트 2017.06.08 17:52 Modify/Delete Reply

    centos를 통해 파이썬을 경험해보려고 하는 학생입니다.
    wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
    맨 처음부터 이 명령어를 쳤더니 404 에러가 뜹니다.
    혹시 해결방법이 있을까요?

    • Favicon of https://blog.helperchoi.com BlogIcon 불량펭귄 helperchoi 2017.06.08 18:01 신고 Modify/Delete

      안녕하세요? fedora Project Repository는 내부 패키지 변경에 따라 버전이 계속 갱신됩니다. 해당 패키지는 아래 링크를 참조하세요.

      http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm

Write a comment