python 3.x – After activating conda virtual env in colab, no changes are being made
I am trying to create a miniconda virtual env in colab, but after activating it there are not changes in python latest version and once I run ! conda info --envs it is not indicating (with the asterisk) any of my env to be used.
There was a similar error, but it is not updated. So I belief is relevant:
conda environment in google colab [google-colaboratory]
I have been following the latest tutorial that I´ve found: saturncloud.io/blog/getting-started-with-conda-environments-in-google-colab/#:~:text=Setting%20Up%20a%20Conda%20Environment%20in%20Google%20Colab,5%20Step%205%3A%20Activate%20the%20Conda%20Environment%20
And here is my code, which is the same except for python’s version.
#Miniconda instalation
!wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
!bash Miniconda3-latest-Linux-x86_64.sh -bfp /usr/local
# create new env and activate
!conda create --name model1_env2 python=3.6 -y
!source activate /usr/local/envs/model1_env2
I also think it could be affected because of this warning:
Python unexpected behavior becasue of the PYTHONPATH. However, I have resolve it with the following code changing pythons path colab
Read more here: Source link
