Installation guide
annnet is designed to stay lightweight by default. The base package only requires NumPy, SciPy, Narwhals, and pkg-infra, and everything heavier is exposed as an optional extra.
Requirements
- Python
3.11+ pipfor standard installs- uv if you want a fast local or development workflow
gitif you want to install from GitHub
Check your environment:
Install from PyPI
If you just want the core package:
This gives you the core graph data structure and algorithms without pulling in backend, plotting, storage, or ML dependencies you may never use.
Choose your extras
Install only the extras you need. annnet exposes both single-purpose extras and broader install bundles.
Tabular data backends
Single extras:
polars: Polars, the recommended dataframe backend for annnet tables and annotationspandas: pandas dataframe supportpyarrow: Apache Arrow table support and parquet-related tabular workflows
If more than one dataframe backend is installed, annnet has a built-in preference order. You can still choose a backend globally or for graph construction when needed; see the support helper reference.
Graph backends
Single extras:
Bundle:
networkx: interoperability with NetworkX and access to its algorithmsigraph: interoperability with python-igraphpyg: PyTorch Geometric supportbackends: installs the pip-installable graph backendsnetworkxandigraph
annnet also supports graph-tool. graph-tool is not available on PyPI: install it separately with Pixi, conda, or your system package manager.
Plotting backends
Single extras:
Bundle:
matplotlib: plots with Matplotlibpydot: DOT export and plots with pydotgraphviz: Python bindings for Graphvizplot: installs all pip-installable plotting backends together
When plot(..., backend="auto") is used, annnet selects the first installed
backend in its plotting preference order. You can still choose a plotting
backend globally or for individual plotting calls; see the
support helper reference.
I/O extras
Single extras:
pip install "annnet[excel]"
pip install "annnet[parquet]"
pip install "annnet[zarr_io]"
pip install "annnet[sbml]"
Bundles:
excel: Excel import/export supportparquet: Parquet I/O support withpyarrowzarr_io:.annnetstorage support with Zarr andnumcodecssbml: SBML parsing supportio: broader I/O bundle including pandas, openpyxl, pyarrow, zarr, numcodecs, lxml, and tomlstorage: storage-oriented subset for parquet/zarr/pandas workflowsmetabo: metabolomics bundle with SBML, COBRApy, and Graphviz
Other install bundles
all: broad pip-installable runtime bundle, excluding non-PyPI dependencies and PyG Useallif you want a batteries-included pip install and do not mind a larger environment.
Install from GitHub with uv
Use this if you want the latest repository version before the next PyPI release:
If you want extras as well, use the package URL in the same way you would use an extra on PyPI, for example:
Local editable install with uv
For development or documentation work with pip-installable dependencies only, clone the repository and install it in editable mode:
git clone https://github.com/saezlab/annnet.git
cd annnet
uv venv
source .venv/bin/activate
uv pip install -e .
For a fuller local environment:
You can also add runtime extras you care about:
Run tests with uv
From the repository root:
Use Pixi for non-pip dependencies
Use Pixi when you want the repository's fuller development environment, especially for dependencies that are not reliably available from PyPI such as graph-tool.
The Pixi environment:
- installs
annneteditable with the repository test dependency group - provides
graph-toolfromconda-forge - is the right path for running tests that depend on non-pip packages
If you want the full test suite inside the Pixi environment, run:
Build and serve the docs
From a repository checkout:
Open http://127.0.0.1:8000. This executes the Quickstart and the five Guide notebooks; Tutorials render their saved outputs. For a strict build without the preview server:
The site is written to site/. See Contributing to the documentation
for faster previews, notebook editing, and the public-site configuration.