【问题标题】:What's the latest conda version compatible with Google Colab与 Google Colab 兼容的最新 conda 版本是什么
【发布时间】:2019-09-13 15:34:46
【问题描述】:

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

那么Anaconda 和Miniconda 的最新兼容版本是什么?以及如何安装?

【问题讨论】:

  • @merv 我已将其编辑为 Anaconda。谢谢!
  • 仅供参考,一旦您安装了 conda 的替代版本,您就可以创建一个单独的环境进行测试。这将避免与您运行的其他代码发生任何冲突。 !conda init!conda create -y -q --name test36 python=3.6。然后你可以使用%%bash和source activate myenv创建一个shell来运行你的python代码

标签: anaconda conda google-colaboratory miniconda


【解决方案1】:

最新的兼容版本是

  • Anaconda 5.2.0
  • Miniconda 4.5.4

以下是它们的安装方法。我使用一个从 pytorch 频道安装 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

对于迷你康达

!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

【讨论】:

    猜你喜欢
    • 2010-09-20
    • 1970-01-01
    • 2021-07-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-15
    • 1970-01-01
    • 2016-04-13
    相关资源
    最近更新 更多