与Google Colab兼容的最新conda版本是什么 [英] What's the latest conda version compatible with Google Colab

查看:299
本文介绍了与Google Colab兼容的最新conda版本是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用conda安装一些库以用于Colab.似乎我们不能使用最新的Anaconda,因为它的Python 3.7不兼容.

I need to use conda to install some library to use with Colab. It seems that we cannot use the latest Anaconda because its Python 3.7 isn't compatable.

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

So what's latest compatible version for both Anaconda and Miniconda? And how to install them?

推荐答案

最新的兼容版本是

  • Anaconda 5.2.0
  • Miniconda 4.5.4

这是安装它们的方法.我举了一个从pytorch渠道安装faiss的示例.

Here's how to install them. I use an example installing faiss from pytorch channel.

!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

For 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

这篇关于与Google Colab兼容的最新conda版本是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆