Conda
CMI Python Meeting
27/3/15
Anaconda
- Anaconda is a distribution of Python developed and maintained by Continuum Analytics.
- It bundles over 195 scientific python libraries as binaries that are very difficult to build, such as MayaVi
- It also provides the conda environment and package manager.
How to install Anaconda
- Go to http://continuum.io/downloads
- Follow the instructions!
Miniconda
- Whilst installing large numbers of packages may be useful, some may only want the bare bones.
- Miniconda is Anaconda, without the packages.
How to install Miniconda
- Go to http://conda.pydata.org/miniconda.html
- Follow the instructions!
- Demo
Using Conda
- Conda is both a package (like pip) and environment (like virtual envs) manager
- However, it is designed to manage the versions of C and C++ extensions, to prevent incorrect library linking.
Conda as an environment Manager
Create a conda environment:
conda create -n {env_name} python={2/3} {packages}
For example:
conda create -n py3k python=2 rdkit
Changing environments
source activate py3k
source deactivate
Switch to an environment:
Exit an environment:
conda env list
List environments:
As a package manager
Install a new package:
conda install {package}
Uninstall a package:
conda remove {package}
Update a package:
conda update {package}
List installed packages
conda list
Works well with pip
pip install requests
conda list
List installed packages
conda list
Doesn't really work well with virtualenvs and virtualenvwrapper :(
Why it's better than virtualenv?
conda create -n py3k python=3 boost=1.56 rdkit
conda create -n py2k python=2 boost=1.56 rdkit
RDKit now works with both Python 2 and Python 3!
This is incredibly difficult without conda.
Conda
By Rich Lewis
Conda
- 1,849