Conda is a general package and virtual environment manager. There is a cheat-sheet here.

Installation (Linux)

To install do:

chmod 777

Accept the installer defaults and agree to updating your ~/.bashrc script. You will need to restart the shell (or source ~/.bashrc) before proceeding. Do:

conda update conda

to update to the latest version. To create an environment (which needs a default package) do:

conda create -n env_name python

I then had to manually install psutil (maybe a bug?):

conda install psutil

To acitvate and deactivate do (linux):

source activate env_name
source deactivate

Adding Packages

To install packages do:

conda install $PACKAGE_NAME

If a package is not on the repo it might be on someone elses ‘channel’. To add a custom channel do:

conda config --add channels $CHANNEL_NAME

To install from a specific channel do:

conda install -c $CHANNEL_NAME $PACKAGE_NAME

To uninstall everything do:

rm -rf ~/miniconda

Building Conda Packages

This requires conda build:

conda install conda-build

Make a ‘build’ folder with the package name and add a metadata file meta.yaml and a built script

touch meta.yaml

The metadata and build files need to be populated ( To build the package do:

conda build .

To upload the package to first install anaconda-client, log into your account and then upload.

conda install anaconda-client
anaconda login
anaconda upload


Some things that have gone awry:

Other Notes

  • conda-forge is a useful channel with some more up-to-date packages than the official repo.


comments powered by Disqus