如何在colab.research上通过conda构建库? [英] How to build libraries via conda on colab.research?

查看:180
本文介绍了如何在colab.research上通过conda构建库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我想使用python-occ库.它需要构建conda-forge.我尝试将其安装在基本笔记本

So I want to use python-occ library. It requires conda-forge to be build. I try to install it in basic notebook

!wget -c https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh
!chmod +x Anaconda3-5.1.0-Linux-x86_64.sh
!bash ./Anaconda3-5.1.0-Linux-x86_64.sh -b -f -p=conda3
!export PYTHONPATH=./conda3/lib/python
!export PATH=./conda3/bin/:$PATH
!conda install -y -c conda-forge -c dlr-sc -c pythonocc -c oce pythonocc-core

但是它将安装一个软件包到condas python中.如何将oit安装包放入全局python或使用其python \ libs文件夹进行cels interpritation?

Yet it will install a package into condas python. How to make oit install package into global python or use its python\libs folder for cels interpritation?

那么在colab中使用conda来构建/安装东西该怎么办?

So what one must do to build/install stuff with conda in colab?

推荐答案

以下似乎有效:

!wget -c https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh
!chmod +x Anaconda3-5.1.0-Linux-x86_64.sh
!bash ./Anaconda3-5.1.0-Linux-x86_64.sh -b -f -p /usr/local
!conda install -y --prefix /usr/local -c <<<your wish>>>>

import sys
sys.path.append('/usr/local/lib/python3.6/site-packages/')

这篇关于如何在colab.research上通过conda构建库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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