Rocky Linux8.5にAnaconda (Pythonディストリビューション)をインストールする

1.OSバージョンの確認
# cat /etc/redhat-release
Rocky Linux release 8.5 (Green Obsidian)

2.ダウンロード先を作成します
# sudo mkdir -p /opt/anaconda
# cd /opt/anaconda
# wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh

3.Anacondaインストール
# bash Anaconda3-2021.11-Linux-x86_64.sh

Welcome to Anaconda3 2021.11

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>              #ENTERキー入力
Please answer 'yes' or 'no':'
>>>               #yes入力

Anaconda3 will now be installed into this location:
/root/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/root/anaconda3] >>>            #ENTER入力
略
installation finished.
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> yes 入力
略
Working with Python and Jupyter notebooks is a breeze with PyCharm Pro,
designed to be used with Anaconda. Download now and have the best data
tools at your fingertips.

PyCharm Pro for Anaconda is available at: https://www.anaconda.com/pycharm

4.Anacondaを実行します

# su - ${USER}
(base) [root@cft ~]# conda info

     active environment : base
    active env location : /root/anaconda3
            shell level : 1
       user config file : /root/.condarc
 populated config files :
          conda version : 4.10.3
    conda-build version : 3.21.5
         python version : 3.9.7.final.0
       virtual packages : __linux=4.18.0=0
                          __glibc=2.28=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /root/anaconda3  (writable)
      conda av data dir : /root/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /root/anaconda3/pkgs
                          /root/.conda/pkgs
       envs directories : /root/anaconda3/envs
                          /root/.conda/envs
               platform : linux-64
             user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.7 Linux/4.18.0-348.2.1.el8_5.x86_64 rocky/8.5 glibc/2.28
                UID:GID : 0:0
             netrc file : None
           offline mode : False

pythonの確認
(base) [root@cft ~]# python
Python 3.9.7 (default, Sep 16 2021, 13:09:58)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type “help", “copyright", “credits" or “license" for more information.
>>>

Rocky Linux 8

Posted by arkgame