読者です 読者をやめる 読者になる 読者になる

AKAI TSUKI

System development or Technical something

Install python 3.5 in CentOS 7(docker container)

Command List

  • install and confirm python3.5
# yum install -y python35u python35u-libs python35u-devel python35u-pip
# find / -name python3.5
# python3.5 -V
  • create symbolic link.
# ln -s /usr/bin/python3.5 /usr/bin/python3
# ls -l /usr/bin/python3
# python3 -V

Detail

[root@519dd98187dd /]# yum install -y python35u python35u-libs python35u-devel python35u-pip
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.riken.jp
 * extras: www.ftp.ne.jp
 * ius: ftp.neowiz.com
 * updates: www.ftp.ne.jp
Resolving Dependencies
--> Running transaction check
---> Package python35u.x86_64 0:3.5.3-1.ius.centos7 will be installed
---> Package python35u-devel.x86_64 0:3.5.3-1.ius.centos7 will be installed
---> Package python35u-libs.x86_64 0:3.5.3-1.ius.centos7 will be installed
---> Package python35u-pip.noarch 0:9.0.1-1.ius.centos7 will be installed
--> Processing Dependency: python35u-setuptools for package: python35u-pip-9.0.1-1.ius.centos7.noarch
--> Running transaction check
---> Package python35u-setuptools.noarch 0:30.2.0-1.ius.centos7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================
 Package                                  Arch                       Version                                     Repository               Size
===============================================================================================================================================
Installing:
 python35u                                x86_64                     3.5.3-1.ius.centos7                         ius                      50 k
 python35u-devel                          x86_64                     3.5.3-1.ius.centos7                         ius                     188 k
 python35u-libs                           x86_64                     3.5.3-1.ius.centos7                         ius                     9.1 M
 python35u-pip                            noarch                     9.0.1-1.ius.centos7                         ius                     1.8 M
Installing for dependencies:
 python35u-setuptools                     noarch                     30.2.0-1.ius.centos7                        ius                     524 k

Transaction Summary
===============================================================================================================================================
Install  4 Packages (+1 Dependent package)

Total download size: 12 M
Installed size: 53 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/ius/packages/python35u-3.5.3-1.ius.centos7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 9cd4953f: NOKEYTA
Public key for python35u-3.5.3-1.ius.centos7.x86_64.rpm is not installed
(1/5): python35u-3.5.3-1.ius.centos7.x86_64.rpm                                                                         |  50 kB  00:00:00
(2/5): python35u-devel-3.5.3-1.ius.centos7.x86_64.rpm                                                                   | 188 kB  00:00:01
(3/5): python35u-pip-9.0.1-1.ius.centos7.noarch.rpm                                                                     | 1.8 MB  00:00:02
(4/5): python35u-setuptools-30.2.0-1.ius.centos7.noarch.rpm                                                             | 524 kB  00:00:04
(5/5): python35u-libs-3.5.3-1.ius.centos7.x86_64.rpm                                                                    | 9.1 MB  00:00:13
-----------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                          898 kB/s |  12 MB  00:00:13
Retrieving key from file:///etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Importing GPG key 0x9CD4953F:
 Userid     : "IUS Community Project <coredev@iuscommunity.org>"
 Fingerprint: 8b84 6e3a b3fe 6462 74e8 670f da22 1cdf 9cd4 953f
 Package    : ius-release-1.0-14.ius.centos7.noarch (installed)
 From       : /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python35u-libs-3.5.3-1.ius.centos7.x86_64                                                                                   1/5
  Installing : python35u-3.5.3-1.ius.centos7.x86_64                                                                                        2/5
  Installing : python35u-setuptools-30.2.0-1.ius.centos7.noarch                                                                            3/5
  Installing : python35u-pip-9.0.1-1.ius.centos7.noarch                                                                                    4/5
  Installing : python35u-devel-3.5.3-1.ius.centos7.x86_64                                                                                  5/5
  Verifying  : python35u-setuptools-30.2.0-1.ius.centos7.noarch                                                                            1/5
  Verifying  : python35u-3.5.3-1.ius.centos7.x86_64                                                                                        2/5
  Verifying  : python35u-pip-9.0.1-1.ius.centos7.noarch                                                                                    3/5
  Verifying  : python35u-libs-3.5.3-1.ius.centos7.x86_64                                                                                   4/5
  Verifying  : python35u-devel-3.5.3-1.ius.centos7.x86_64                                                                                  5/5

Installed:
  python35u.x86_64 0:3.5.3-1.ius.centos7        python35u-devel.x86_64 0:3.5.3-1.ius.centos7    python35u-libs.x86_64 0:3.5.3-1.ius.centos7
  python35u-pip.noarch 0:9.0.1-1.ius.centos7

Dependency Installed:
  python35u-setuptools.noarch 0:30.2.0-1.ius.centos7

Complete!
[root@519dd98187dd /]#
[root@519dd98187dd /]# find / -name python3.5
/usr/bin/python3.5
/usr/lib/python3.5
/usr/lib64/python3.5
[root@519dd98187dd /]# python3.5 -V
Python 3.5.3
[root@519dd98187dd /]#
[root@519dd98187dd /]# ln -s /usr/bin/python3.5 /usr/bin/python3
[root@519dd98187dd /]# ls -l /usr/bin/python3
lrwxrwxrwx 1 root root 18 Feb 11 08:48 /usr/bin/python3 -> /usr/bin/python3.5
[root@519dd98187dd /]# python3 -V
Python 3.5.3
[root@519dd98187dd /]#