Installation#

Installing physquirrel#

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

  • From PyPI — stable release:

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

    git clone https://github.com/nholtgrefe/squirrel
    cd squirrel
    pip install -e .
    

Optional dependency groups#

Visualization extras (via PhyloZoo’s plotting utilities):

pip install physquirrel[viz]

Graphviz extras (via PhyloZoo’s plotting utilities, for Graphviz-based rendering):

pip install physquirrel[graphviz]

Development and testing tools:

pip install physquirrel[dev]

Documentation dependencies:

pip install physquirrel[docs]

Requirements#

The following are required and installed automatically with pip:

  • phylozoo >= 0.1.2 — core datatypes for phylogenetic networks, splits, quartets, distance matrices, and MSAs.

  • numpy >= 1.20 — numerical arrays and distance matrix operations.

  • networkx >= 3.0 — graph algorithms used in quartet joining and cycle resolution.

  • numba >= 0.56 — JIT-accelerated Held-Karp TSP solver used in cycle resolution.

Verifying Installation#

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

>>> import physquirrel as sq
>>> print(sq.__version__)
x.y.z  # your installed version

Building Documentation#

To build the documentation locally, install the optional documentation dependencies and run sphinx-build from the repository root:

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

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

Troubleshooting#

Slow first call: The Held-Karp TSP kernel (used inside optimal_tsp_tour()) is JIT-compiled by Numba on first invocation. This is expected — subsequent calls in the same Python session are fast.