conda install google colab code example

Example 1: anaconda google colab

# same
!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
# update 1
!conda install -q -y --prefix /usr/local python=3.6 ujson
# update 2
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages')
# test it
import ujson
print(ujson.dumps({1:2}))

Example 2: colab install conda

%%bashMINICONDA_INSTALLER_SCRIPT=Miniconda3-4.5.4-Linux-x86_64.shMINICONDA_PREFIX=/usr/localwget https://repo.continuum.io/miniconda/$MINICONDA_INSTALLER_SCRIPTchmod +x $MINICONDA_INSTALLER_SCRIPT./$MINICONDA_INSTALLER_SCRIPT -b -f -p $MINICONDA_PREFIX