conda environment in google colab [google-colaboratory]

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 … Read more

Viewing history of conda transactions?

There is a –revisions, -r flag for this. conda list –revisions Check the conda list –help for more info. If you’d like an exact history, there is a conda-meta/history log in every environment. You could, for example, pull out every command ever executed in an environment, plus a timestamp, using grep -B1 “^# cmd” ${CONDA_PREFIX}/conda-meta/history

How can you “clone” a conda environment into the root environment?

There are options to copy dependency names/urls/versions to files. Recommendation Normally it is safer to work from a new environment rather than changing root. However, consider backing up your existing environments before attempting changes. Verify the desired outcome by testing these commands in a demo environment. To backup your root env for example: λ conda … Read more