What's the latest conda version compatible with Google Colab

ε祈祈猫儿з 提交于 2019-12-22 13:03:01

问题


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.

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


回答1:


The latest compatible versions are

  • Anaconda 5.2.0
  • Miniconda 4.5.4

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

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/')

update 2019-12

Someone report bug. Here's the new code to install ujson, as an example.

!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


来源:https://stackoverflow.com/questions/55828329/whats-the-latest-conda-version-compatible-with-google-colab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!