anaconda - 与 Google Colab 兼容的最新 conda 版本是什么

标签 anaconda conda google-colaboratory miniconda

我需要使用 conda 安装一些与 Colab 一起使用的库。看来我们无法使用最新的 Anaconda,因为它的 Python 3.7 不兼容。

那么 AnacondaMiniconda 的最新兼容版本是什么?以及如何安装它们?

最佳答案

最新的兼容版本是

  • Anaconda 5.2.0
  • Miniconda 4.5.4

以下是安装它们的方法。我使用一个从 pytorch channel 安装 faiss 的示例。

!wget -c https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
!chmod +x Anaconda3-5.2.0-Linux-x86_64.sh
!bash ./Anaconda3-5.2.0-Linux-x86_64.sh -b -f -p /usr/local
# can change to another channel or package
!conda install -q -y --prefix /usr/local -c pytorch faiss-cpu
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages/')
import faiss

对于 miniconda

!wget -c https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh
!chmod +x Miniconda3-4.5.4-Linux-x86_64.sh
!bash ./Miniconda3-4.5.4-Linux-x86_64.sh -b -f -p /usr/local
!conda install -q -y --prefix /usr/local -c pytorch faiss-cpu
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages/')

2019-12 更新

有人报告错误。作为示例,以下是安装 ujson 的新代码。

!wget -c https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh
!chmod +x Miniconda3-4.5.4-Linux-x86_64.sh
!bash ./Miniconda3-4.5.4-Linux-x86_64.sh -b -f -p /usr/local
!conda install -q -y --prefix /usr/local python=3.6 ujson
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages/')
import ujson

关于anaconda - 与 Google Colab 兼容的最新 conda 版本是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55828329/

相关文章:

python - Conda 安装命令失败

python - 同时使用 Conda、PIP 和 Jupyter Notebook 的路径困惑

python - Google Colab 在多大程度上支持 Python 类型?

python-3.x - Visual Studio Code、Conda 和 Python 环境(我无法让它工作)

python - 访问单元格内的其他单元格内容 (Colab)

google-colaboratory - google colab上 "Power Level"的含义

python - 如何在music21中设置应用程序路径

python - 如何在 Visual Studio 2017 中将包添加到 python

c++ - Ubuntu Conda环境下无法编译R包: x86_64-conda-linux-gnu-c++: not found

python - 使用 Python 2 的 Anaconda 发行版安装 gmpy (Windows)