conda environment in google colab [google-colaboratory]

前端 未结 4 1697
天命终不由人
天命终不由人 2021-02-05 08:40

I am trying to create a conda environmet in google colab notebook. I succesfully installed conda with the following comannd

!wget -c https://repo.contin

4条回答
  •  忘了有多久
    2021-02-05 09:00

    You can activate and run a new conda environment in Google Colab by using the magic %%bash command:

    %%bash
    source activate myenv
    
    python
    import sys
    # some simple python commands
    sys.path.append('/usr/local/lib/python3.6/site-packages')
    print(sys.path)
    
    print("Python version")
    print(sys.version)
    

    Also including a few other commands I needed to run to get my environment setup completely:

    !conda update conda -y -q
    !source /usr/local/etc/profile.d/conda.sh
    !conda init 
    !conda install -n root _license -y -q
    

提交回复
热议问题