Local development environement¶
The first thing that you want to do is setup your local development environement so you can start developing. Thanks to conda this is quite easy. Here are the instrunctions:
$ conda config --set show_channel_urls True $ conda config --add channels https://www.idiap.ch/software/bob/conda
Make sure you are using only our channel (with the highest priority)
defaults (with the second highest priority). If you use any other
conda-forge, you may end-up with broken environements.
To see which channels you are using run:
$ conda config --get channels
- Create a new environment that you will use for development.
We recommend creating a new conda environment for every project or task that you work on. This way you can have several isolated development environments which can be very different form each other.
$ mkdir awesome-project $ conda create --copy -p awesome-project/conda-env \ python=3 bob-devel bob.extension $ source activate awesome-project/conda-env
--copy option in the
conda create command copies all files from
conda’s cache folder into your environment. If you don’t provide it, it
will try to create hard links to save up disk space but you will risk
modifying the files in all your environments without knowing. This can
easily happen if you use pip for example to manage your environment.
That’s it. Now you have an isolated conda environment for your awesome project! bob-devel is a conda meta package that pulls a set of common software into your environment. To see what is installed, run:
$ conda list
$ conda install bob
One important advantage of using conda and zc.buildout is that it does not require administrator privileges for setting up any of the above. Furthermore, you will be able to create distributable environments for each project you have. This is a great way to release code for laboratory exercises or for a particular publication that depends on Bob.