Installing CDlib¶
CDlib
requires python>=3.8.
To install the latest version of our library just download (or clone) the current project, open a terminal and run the following commands:
pip install -r requirements.txt
pip install -r requirements_optional.txt # (Optional) this might not work in Windows systems due to C-based dependencies.
pip install .
Alternatively use pip
pip install cdlib
or conda
conda create -n cdlib python=3.9
conda config --add channels giuliorossetti
conda config --add channels conda-forge
conda install cdlib
You can install the development version directly from the GitHub repository with
pip install git+https://github.com/GiulioRossetti/cdlib.git
Optional Dependencies¶
PyPi package¶
To simplify the installation process, the default installation does not include optional dependencies (e.g., graph-tool
). If you need them, you can install them manually or run the following command:
pip install 'cdlib[C]'
This option, safe for GNU/Linux users, will install all those optional dependencies that require C code compilation.
pip install 'cdlib[pypi]'
This option will install all those optional dependencies that are not available on conda/conda-forge.
pip install 'cdlib[all]'
This option will install all optional dependencies accessible with the flag C and pypi.
Advanced¶
Due to some strict requirements, the installation of a subset of optional dependencies is left outside the previous procedures.
graph-tool¶
CDlib
integrates the support for SBM models offered by graph-tool
.
To install it refer to the official documentation and install the conda-forge version of the package (or the deb version if in a *nix system).
ASLPAw¶
Since its 2.1.0 release ASLPAw
relies on gmpy2
whose installation through pip is not easy to automatize due to some C dependencies.
To address such issue test the following recipe:
conda install gmpy2
pip install shuffle_graph>=2.1.0 similarity-index-of-label-graph>=2.0.1 ASLPAw>=2.1.0
In case ASLPAw installation fails, please refer to the official gmpy2
repository.
Optional Dependencies (Conda package)¶
CDlib
relies on a few packages not available through conda: to install them please use pip.
pip install pycombo
pip install GraphRicciCurvature
conda install gmpy2
pip install shuffle_graph>=2.1.0 similarity-index-of-label-graph>=2.0.1 ASLPAw>=2.1.0
In case ASLPAw installation fails, please refer to the official gmpy2
repository repository.