Installation¶
Infomap is available on PyPI. Install it with:
pip install infomap
Upgrade an existing installation with:
pip install --upgrade infomap
Optional integrations¶
Install optional integrations for common research workflows:
pip install "infomap[networkx]"
pip install "infomap[igraph]"
pip install "infomap[pandas]"
pip install "infomap[scipy]"
pip install "infomap[anndata]"
Or install all optional integrations at once:
pip install "infomap[all]"
Command line interface¶
The package also installs the infomap executable. Verify that the CLI is
available with:
infomap -v
Command line usage:
infomap [options] network_data destination
For a list of available options, run:
infomap --help
Interactive shell¶
Start a Python shell with Infomap preloaded:
infomap-shell
The shell imports Infomap, InfomapOptions, and MultilayerNode.
It also creates im = Infomap(pretty=True) and provides summary() and
options() helpers. Pass one network file to preload it:
infomap-shell examples/networks/twotriangles.net
Shell completion¶
Install shell completion scripts manually with:
mkdir -p ~/.zfunc
infomap --completion zsh > ~/.zfunc/_infomap
mkdir -p ~/.local/share/bash-completion/completions
infomap --completion bash > ~/.local/share/bash-completion/completions/infomap
For Zsh, make sure ~/.zfunc is in fpath and compinit is loaded from
~/.zshrc. For Bash, make sure bash-completion is sourced from
~/.bashrc.