Installation¶
Infomap requires Python 3.11 or later and is available on PyPI. Install it with:
pip install infomap
Upgrade an existing installation with:
pip install --upgrade infomap
Command line interface¶
The package also installs the infomap executable. Verify that the CLI is
available with:
infomap -V
Command line usage:
infomap network_file out_directory [options]
For a list of available options, run:
infomap --help
Interactive shell¶
Start a Python shell with Infomap preloaded:
infomap-shell
The shell imports the infomap module along with Infomap, Options, and MultilayerNode.
It also creates im = Infomap() and provides summary() and
options() helpers. Pass one network file to preload it:
infomap-shell mynetwork.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.
Next, continue to Quick start for the smallest Python API examples.