2019年9月26日木曜日

centos6.7にpython3.6のインストール方法

centos6にディフォルトpython2.6がインストールされている状態ですが、python3系を使いたいので、早速インストールしてみます。

まず、iusリポジトリーが有効にします。

# yum install -y https://centos6.iuscommunity.org/ius-release.rpm
Loaded plugins: fastestmirror, security
Setting up Install Process
Cannot open: https://centos6.iuscommunity.org/ius-release.rpm. Skipping.
Error: Nothing to do

理由はよくわからないですが、リポジトリーを足せなかったです。
むりやり、rpmファイルを落としてきます。
# wget https://centos6.iuscommunity.org/ius-release.rpm
rpmでインストールします。
# rpm -ivh ius-release.rpm
インストールできたことを確認します。
# yum repolist all | grep 'ius'
ius                    IUS for Enterprise Linux 6 - x86_64        enabled:   244
ius-archive            IUS for Enterprise Linux 6 - Archive - x86 disabled
ius-archive-debuginfo  IUS for Enterprise Linux 6 - Archive - x86 disabled
ius-archive-source     IUS for Enterprise Linux 6 - Archive - Sou disabled
ius-debuginfo          IUS for Enterprise Linux 6 - x86_64 - Debu disabled
ius-source             IUS for Enterprise Linux 6 - Source        disabled
ius-testing            IUS for Enterprise Linux 6 - Testing - x86 disabled
ius-testing-debuginfo  IUS for Enterprise Linux 6 - Testing - x86 disabled

ius-testing-source     IUS for Enterprise Linux 6 - Testing - Sou disabled

Python3.6をインストールします。

インストール可能なパッケージがあるかを確認
# yum --enablerepo=ius search python36
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: ftp-srv2.kddilabs.jp
 * extras: ftp-srv2.kddilabs.jp
 * updates: ftp-srv2.kddilabs.jp
============================================================================== N/S Matched: python36 ===============================================================================
python36u-test.x86_64 : The self-test suite for the main python36u package
python36.x86_64 : Interpreter of the Python programming language
python36-debug.x86_64 : Debug version of the Python runtime
python36-devel.x86_64 : Libraries and header files needed for Python development
python36-gunicorn.noarch : Python WSGI application server
python36-idle.x86_64 : A basic graphical development environment for Python
python36-libs.x86_64 : Python runtime libraries
python36-lxml.x86_64 : XML processing library combining libxml2/libxslt with the ElementTree API
python36-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
python36-pip.noarch : A tool for installing and managing Python packages
python36-redis.noarch : Python interface to the Redis key-value store
python36-setproctitle.x86_64 : Python module to customize a process title
python36-setuptools.noarch : Easily build and distribute Python packages
python36-test.x86_64 : The self-test suite for the main python3 package
python36-tkinter.x86_64 : A GUI toolkit for Python
python36u.x86_64 : Interpreter of the Python programming language
python36u-debug.x86_64 : Debug version of the Python runtime
python36u-devel.x86_64 : Libraries and header files needed for Python development
python36u-gunicorn.noarch : Python WSGI application server
python36u-libs.x86_64 : Python runtime libraries
python36u-lxml.x86_64 : XML processing library combining libxml2/libxslt with the ElementTree API
python36u-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
python36u-pip.noarch : A tool for installing and managing Python packages
python36u-redis.noarch : Python interface to the Redis key-value store
python36u-setproctitle.x86_64 : Python module to customize a process title
python36u-setuptools.noarch : Easily build and distribute Python packages
python36u-tkinter.x86_64 : A GUI toolkit for Python
python36u-tools.x86_64 : A collection of tools included with Python including 2to3 and idle
uwsgi-plugin-python36u.x86_64 : uWSGI - Plugin for Python support
いよいよインストールします。
# yum --enablerepo=ius install python36
インストールできたことを確認
# python36 --version
Python 3.6.8

0 件のコメント:

コメントを投稿