Installation

sparrow runs on Python 3.7+ and includes compiled (Cython) extensions. The sections below cover setting up an isolated environment and installing sparrow with either pip or uv, from PyPI or directly from GitHub.

2. Install sparrow

Install from PyPI (stable)

# with pip
pip install idptools-sparrow

# with uv
uv pip install idptools-sparrow

Install from GitHub (latest)

To get the most recent development version straight from the repository:

# with pip
pip install git+https://github.com/idptools/sparrow.git

# with uv
uv pip install git+https://github.com/idptools/sparrow.git

Note

Installing from GitHub builds the Cython extensions locally, so you need a working C compiler (Xcode command-line tools on macOS, build-essential on Debian/Ubuntu, or MSVC build tools on Windows). NumPy is required at build time and is installed automatically.

3. Verify the installation

python -c "import sparrow; print(sparrow.__version__)"
from sparrow import Protein

p = Protein("MEEEKKKKSSSTTTDDD")
print(p.FCR, p.NCPR, p.kappa)

If those run without error, sparrow is installed correctly.

Dependencies

Core sequence analysis works out of the box. The deep-learning predictors (reached via Protein.predictor) rely on PyTorch through the parrot dependency, which is installed automatically; the first call to a given predictor loads its network lazily.

Next steps