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
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?
So what one must do to build/install stuff with conda
in colab
?
I once needed a library that was available only through Conda too. My solution is that
!pip install
all the requirements of that libraryAnd it worked for me.
The following seems to work:
The
-p
argument when executing the installer is not used correctly. It should be:instead of:
You're actually installing conda in the folder
=conda3
. Since the output you see is the message:you probably have another install of conda (done with pip) in your system python.
EDIT following the OP's edit
First of all, I would like to say that it is not good practice to entirely change the question with an edit. Please ask a new question if you encounter new problems !!
I think you do not understand how conda works. It creates virtual environments which you can activate or deactivate. Your question:
makes no sense since installing a package into global python (not in a virtual environments) has nothing to do with conda. Furthermore you state:
conda-forge
is a channel in conda. It is only a repository where packages are located and available for download. You don't "install" conda-forge, you put it as a channel (option -c) when you want to download a tool from this repository.Having said this, here is how I would solve the problem. After having installed Anaconda (btw, you didn't change the code concerning the -p option like I describe above), you create a virtual environment that will host all the tools you need:
then you activate your environment to access the tools you just installed
Now, you should have access to everything you need.