conda
-based installation of MDAnalysis¶
Get the appropriate miniconda installer for Python 2.7; in the example we are using the Linux 64 bit one. Common choices:
- Linux x86_64 (64 bit): https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
- Mac OS X (64 bit): https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh
Run the installer to install the conda package manager and the necessary packages:
# example for Linux x86_64
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
# for Mac OS X, uncomment the following line and comment the preceding one
# wget https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh
# from here on use the same commands for Linux/Mac OS X
chmod +x miniconda.sh
./miniconda.sh -b
export PATH=${HOME}/miniconda/bin:$PATH
conda update --yes conda
conda create --yes -n mdaenv python=2.7 numpy=1.9.2 scipy=0.16 nose=1.3.7 ipython ipython-notebook ipython-qtconsole
source activate mdaenv
conda install --yes python=2.7 cython biopython matplotlib networkx netcdf4
# install the latest release of MDAnalysis (≥ 0.11.0)
pip install --upgrade MDAnalysis
pip install --no-cache-dir --upgrade MDAnalysisTests
The installation is performed in the virtual environment named mdaenv, which must be activated for use in the each shell session:
source activate mdaenv
(For more technical details see virtualenv.)
Add the line:
export PATH=${HOME}/miniconda/bin:$PATH
to your shell start-up file (e.g.
~/.bashrc
) so that theactivate
script and other commands are found.The
--no-cache-dir
option for pip may be necessary to avoid aMemoryError
in low-memory environments such as our virtual machines; with lots of memory you may omit it (see pip issue #2984).conda will also install the HDF5 and netcdf libraries for you so you will have a full feature installation of MDAnalysis
You will also get ipython with its Jupyter notebook interface.