0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Last updated at Posted at 2020-01-24

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

インストーラーは以下にあります。
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のディレクトリにpathを通しておきます。

export PATH="$PATH:/home/NAME/miniconda3/bin"

これで、インストール完了ですが、ここでいったんターミナルを閉じて、シェルを再起動する必要があります(重要)。

再起動後、「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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?