sessioninstallationcrashcondagoogle-colaboratory

Why is my session always crashed after intall conda in Google Colab


I am trying to setup and run Conda on Google Colab. However, everytime I run the following code to install conda

!pip install -q condacolab 
import condacolab
condacolab.install()

My session would crash. I'm doing the above because I want to use '!conda install' in Google Colab.

Is there something wrong with the code above or should I change other settings in Colab.

I'm always using GPU or TPU. enter image description here


Solution

  • As per the documentation, there is forced kernel restart, which is required for the Conda installation to be integrated in the session:

    "It is important that you perform the installation first thing in the notebook because it will require a kernel restart, thus resetting the variables set up to that point." [emphasis added]