anaconda - 与 Google Colab 兼容的最新 conda 版本是什么
问题描述
我需要使用conda
安装一些库来与 Colab 一起使用。似乎我们不能使用最新的 Anaconda,因为它的 Python 3.7 不兼容。
那么 和 的最新兼容版本是Anaconda
什么Miniconda
?以及如何安装它们?
解决方案
最新的兼容版本是
- 蟒蛇5.2.0
- 迷你康达 4.5.4
以下是如何安装它们。我使用faiss
从 pytorch 频道安装的示例。
!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
推荐阅读
- javascript - Deleting Service worker cache crashes
- python - 从python中的元素列表绘制直方图
- php - How to replace custom tags with HTML tags?
- java - How can I switch on *.class files to dependencies during build java project?
- angular - 如何根据Angular 6中的条件显示/隐藏li标签
- amazon-web-services - CodeDeploy 在安装 lambda 之前卡住
- javascript - 将子类别添加到类别数组
- python - 给定索引值的新熊猫数据框
- r - 从 GitHub 安装 R 包时出现错误“依赖项中的无效比较运算符:>=”
- php - 使用 .htaccess 和国家/地区位置(在网站 url 中)重定向到自定义 404 页面