Installation#
Dependencies#
cbclib has the following mandatory runtime dependencies:
Python 3.6 or later (Python 2.x is not supported).
FFTW library 3.3.8 or later, which is used for fast fourier transform computations.
GNU Scientific Library 2.4 or later, which is used for pseudo-random number generation.
LLVM’s OpenMP library 10.0.0 or later, which is used for parallelization.
h5py 2.10.0 or later, which is used to work with CXI files.
NumPy 1.19.0 or later.
SciPy 1.5.2 or later.
tqdm 4.56.0 or later.
Packages#
cbclib packages are available through pypi and conda on OS X and Linux platforms.
conda#
cbclib binary distribution is available via the conda package manager for Linux and OSX (Windows is not supported) in conda-forge channel. In order to install cbclib via conda, you just need to add conda-forge to the channels, and install as following:
$ conda config --add channels conda-forge
$ conda config --set channel_priority strict
$ conda install cbclib
The conda packages for cbclib are regularly updated when a new version is released.
pip#
cbclib source distribution is available via the pip package installer. Installation is pretty straightforward:
$ pip install cbclib
If you want to install cbclib for a single user instead of system-wide, you can do:
$ pip install --user cbclib
Installation from source#
In order to install cbclib from source you will need:
a C++ compiler (gcc or clang will do).
Python 3.6 or later (Python 2.x is not supported).
FFTW library 3.3.8 or later, which is used for fast fourier transform computations.
GNU Scientific Library 2.4 or later, which is used for pseudo-random number generation.
LLVM’s OpenMP library 10.0.0 or later, which is used for parallelization.
Cython 0.29 or later.
NumPy 1.19.0 or later.
SciPy 1.5.2 or later.
h5py 2.10.0 or later, which is used to work with CXI files.
tqdm 4.56.0 or later.
After installing the dependencies, you can download the the source code from the
GitHub cbclib repository page. Or you can
download the last version of cbclib repository with git:
$ git clone https://github.com/simply-nicky/cbclib.git
After downloading the cbclib’s source code, cd into the repository root folder and
build the C++ libraries using setuputils:
$ cd cbclib
$ python setup.py install
OR
$ pip install -r requirements.txt -e . -v
Getting help#
If you run into troubles installing cbclib, please do not hesitate to contact me either through my mail or by opening an issue report on github.