LoginSignup
1
0

More than 1 year has passed since last update.

google colaboratoryでcondaコマンドを使い仮想環境をactivateする方法

Posted at

Minicondaのインストール

%%bash
MINICONDA_INSTALLER=Miniconda3-py39_4.9.2-Linux-x86_64.sh
MINICONDA_DOWNLOAD_HP=https://repo.anaconda.com/miniconda

MINICONDA_PREFIX=/usr/local
wget $MINICONDA_DOWNLOAD_HP/$MINICONDA_INSTALLER
chmod +x $MINICONDA_INSTALLER
./$MINICONDA_INSTALLER -b -f -p $MINICONDA_PREFIX

上記のコマンドをterminalに入力します。

使っているShellを確認する

echo $SHELL
<出力>
/bin/zsh

ならzshを、

<出力>
/bin/bash

ならbashを使っています。

Shellに応じてconda init

zshを使っているなら

conda init zsh

bashを使っているなら

conda init bash

と入力しterminalを 再起動 します

#終了コマンド
exit

これでconda activateコマンドが使えるようになります

1
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
1
0