如何在 Google Colab 中安装 Anaconda

rch*_*urt 1 ubuntu anaconda conda miniconda google-colaboratory

Anaconda 没有预装在 Google Colab 上,但我想用它来安装和管理软件包。我该如何安装它?

rch*_*urt 6

在代码单元中运行以下命令:

# Install conda and add channels to look for packages in
import sys
! wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
! chmod +x Anaconda3-2020.02-Linux-x86_64.sh
! bash ./Anaconda3-2020.02-Linux-x86_64.sh -b -f -p /usr/local
sys.path.append('/usr/local/lib/python3.7/site-packages/')
! conda update -n base -c defaults conda -y
! conda config --add channels bioconda
! conda config --add channels conda-forge
Run Code Online (Sandbox Code Playgroud)