What is the best way to Install Conda on MacOS (Apple/Mac)?
brew install anaconda export PATH=”/usr/local/anaconda3/bin:$PATH”
brew install anaconda export PATH=”/usr/local/anaconda3/bin:$PATH”
A quick update as of July 2021. TLDR The conda-forge group have a M1 native conda installer here. Installation is simple – run the installer, and you have conda up and running. This will install an M1 native conda, and that conda’s default environment will by default install M1 native python versions and M1 native … Read more
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
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
You can use a conda custom channel as your private repo. The essential steps are to use “conda build” to create a conda package, then copy that package into your custom channel (a directory), and now run conda index on that directory. You can then install packages from this channel by using the “conda install … Read more
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
You can import the module and check the module.__file__ string. It contains the path to the associated source file. Alternatively, you can read the File tag in the the module documentation, which can be accessed using help(module), or module? in IPython.
I had to use the install function instead: conda install pandas=0.13.1
Use the –prefix or -p option to specify where to write the environment files. For example: conda create –prefix /tmp/test-env python=2.7 Will create the environment named /tmp/test-env which resides in /tmp/ instead of the default .conda.
I use git hooks to make conda environment updates automatic. You can have more information on git hooks here. The idea here is to have two git hooks: One which detects if a change in your local conda environment occured and if so, create a new commit with the updated env.yml file (I chose a … Read more