Compute Engineのvm instanceにMinicondaをインストールする

インストーラーのダウンロード

インストーラーは以下にあります。
https://docs.conda.io/en/latest/miniconda.html
今回はVM instanceなのでLinux用のものをインストールします。
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

インストール

ダウンロードしたインストーラーを実行します。
sh Miniconda3-latest-Linux-x86_64.sh
そうすると以下のような画面が表示されます。
Welcome to Miniconda3 4.7.12
......
エンターを押しまくりましょう。
以下のような画面になると思います。
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 
Please answer 'yes' or 'no':'
そしたら、yesをタイプしましょう。
次にこのような画面になります。
Miniconda3 will now be installed into this location:
/home/NAME/miniconda3

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

[/home/NAME/miniconda3] >>>
インストールする場所を聞かれているので、そのままでよければエンターを押します。
最後にこのような画面になったら、またyesと入力します。
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>> 
これで、インストール完了ですが、ここでいったんターミナルを閉じて、シェルを再起動する必要があります(重要)。
再起動後、「conda」と入力して以下のようになればOKです。
$ conda
usage: conda [-h] [-V] command ...

conda is a tool for managing and deploying applications, environments and packages.

Options:

positional arguments:
  command
    clean        Remove unused packages and caches.
    config       Modify configuration values in .condarc. This is modeled
                 after the git config command. Writes to the user .condarc
                 file (/home/masakazu_ishikawa/.condarc) by default.
    create       Create a new conda environment from a list of specified
                 packages.
    help         Displays a list of available conda commands and their help
                 strings.
    info         Display information about current conda install.
    init         Initialize conda for shell interaction. [Experimental]
    install      Installs a list of packages into a specified conda
                 environment.
    list         List linked packages in a conda environment.
    package      Low-level conda package utility. (EXPERIMENTAL)
    remove       Remove a list of packages from a specified conda environment.
    uninstall    Alias for conda remove.
    run          Run an executable in a conda environment. [Experimental]
    search       Search for packages and display associated information. The
                 input is a MatchSpec, a query language for conda packages.
                 See examples below.
    update       Updates conda packages to the latest compatible version.
    upgrade      Alias for conda update.

optional arguments:
  -h, --help     Show this help message and exit.
  -V, --version  Show the conda version number and exit.

conda commands available from other packages:
  env


conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda

アーカイブ

もっと見る