# PyStan

> Python interface to Stan for Bayesian inference

Source: https://talira.ai/catalog/pystan-s7s7mbvj
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / math / statistics](https://talira.ai/categories/libraries/math/statistics), [languages / python](https://talira.ai/categories/languages/python)
- Platforms: linux, macos[^2]
- Licence: ISC[^2][^3]
- Pricing: Free and open source[^3]
- Free tier: yes[^3]
- Backed by: [Stan Development Team](https://talira.ai/orgs/stan-dev.md)

PyStan is a [Python](https://talira.ai/catalog/python-tgjs08pq.md) interface to [Stan](https://talira.ai/catalog/stan-rerqryze.md): you pass it a Stan program and data, and it compiles the model and runs Stan's sampler, with an interface similar to RStan's. It caches compiled models and their samples automatically, and runs on Linux and macOS with a C++ compiler (gcc 9+ or clang 10+).

## Links

- GitHub: https://github.com/stan-dev/pystan

## Problems it solves

- fit a Stan model from a Python script
- Bayesian inference in Python with Stan
- run the eight schools model in Python

## Features

- compile and sample Stan models from Python
- automatic caching of compiled models and samples
- RStan-like interface

## Limitations

- Stan's install page says PyStan is no longer actively supported as of 3.10.0.[^1]
- Linux and macOS only.[^2]

## Trust

Overall: 0.37 out of 1.
Signals: maintenance 0.45, adoption 0.51, momentum 0.19, community 0.47, backing 0.30, extensibility 0.00.

- last commit 3 months ago
- 365 GitHub stars
- 14 contributors
- accepts sponsorship (Github, Custom)
- backed by Stan Development Team

## Related

- Works with [Stan](https://talira.ai/catalog/stan-rerqryze.md)

## Alternatives

- [CmdStanPy](https://talira.ai/catalog/cmdstanpy-tdkjcbhm.md): Lightweight Python interface to CmdStan
- [Stan](https://talira.ai/catalog/stan-rerqryze.md): Probabilistic programming language for Bayesian statistical modelling
- [CmdStan](https://talira.ai/catalog/cmdstan-0kddshy5.md): Command-line interface to Stan for compiling and running Bayesian models
- [PyMC](https://talira.ai/catalog/pymc-r67zqyr4.md): Bayesian modeling and probabilistic programming in Python

## Sources

[^1]: https://mc-stan.org/install/ (checked 29 Nov 2026)
[^2]: https://github.com/stan-dev/pystan/blob/main/README.rst (checked 29 Nov 2026)
[^3]: https://github.com/stan-dev/pystan/blob/main/LICENSE (checked 29 Nov 2026)
