Installation Guide#

Installing phypanda#

phypanda is a Python package that runs on Python (>= 3.7). Choose one of:

  • From PyPI — stable release:

    pip install phypanda
    
  • From source — editable install, recommended for development:

    cd panda
    pip install -e .
    

Optional dependency groups#

Development and testing tools:

pip install phypanda[dev]

Documentation dependencies:

pip install phypanda[docs]

Requirements#

The following are required and installed automatically with pip:

  • phylozoo >= 0.1.2 — directed phylogenetic networks and I/O.

  • networkx >= 3.0 — graph algorithms shared with phylozoo and scanwidth.

  • scanwidth >= 0.2.5 — tree extensions and node-scanwidth computation.

  • numba >= 0.56 — JIT-accelerated dynamic programming (can be disabled per call).

Verifying Installation#

To verify that phypanda is installed correctly, import it and print the version. The latest version is 2.1.0.

>>> import phypanda as pp
>>> print(pp.__version__)
x.y.z  # your installed version

Building Documentation#

To build the documentation locally, install the optional documentation dependencies:

pip install -e ".[docs]"
sphinx-build -b html docs/source docs/build/html

Open docs/build/html/index.html in a browser.

Troubleshooting#

Slow first call with numba=True: Numba compiles JIT kernels on first invocation. This is expected — subsequent calls in the same Python session are fast. Pass numba=False to any solver call to skip JIT compilation entirely.

Parallel edges: Some solvers require a network without parallel arcs. phylozoo may merge parallel edges during preprocessing. If you encounter unexpected solver errors, check whether your network has parallel arcs.