🐍

(無料) WSL2へのMiniforge導入メモ

に公開

ダウンロードからインストーラー実行まで

Miniforgeのgithubのリリースから対象のインストーラーを見つける:

https://github.com/conda-forge/miniforge/releases

自身のCPUに応じて適切なインストーラのリンクをコピーしてダウンロード。
以下はIntel CPUの場合の例

sudo wget https://github.com/conda-forge/miniforge/releases/download/25.3.1-0/Miniforge3-25.3.1-0-Linux-x86_64.sh

ダウンロードしたファイルの権限を実行可能なように変更して実行。

sudo chmod 777 ./Miniforge3-25.3.1-0-Linux-x86_64.sh
./Miniforge3-25.3.1-0-Linux-x86_64.sh

インストーラー実行

  1. 利用規約が表示されるので「yes」で同意。
  2. インストール先を聞かれるので確認する。デフォルトでよければEnter
  3. インストール完了後、これから毎回自動でcondaを実行するように.bashrcを書き換えるか聞かれるので、用途に応じて選択。Pythonをメインで使うならyesとすると便利:
    Do you wish to update your shell profile to automatically initialize conda?
    This will activate conda on startup and change the command prompt when activated.
    If you'd prefer that conda's base environment not be activated on startup,
       run the following command when conda is activated:
    
    conda config --set auto_activate_base false
    
    You can undo this by running `conda init --reverse $SHELL`? [yes|no]
    [no] >>>
    
  4. yesとした場合、.bashrcを実行すれば完了。
source ~/.bashrc

Discussion