$npx skillfedfor your agent

pystan

Python interface to Stan, a package for Bayesian inference

With conditionsPyPI MathematicsReleased Mar 20261.4M downloads / moISCPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pystan-3.10.1-py3-none-any.whl
v3.10.1 · released 2026-03-12 · Python <4.0,>=3.12 · 6 runtime deps: aiohttp, httpstan, pysimdjson, numpy, clikit, setuptools

Yes, if you need Bayesian inference. PyStan is actively maintained, has no known vulnerabilities, and is widely trusted in research and industry. The main requirement is a C++ compiler on your system. Worth installing for any project involving probabilistic modeling, uncertainty quantification, or hierarchical statistical inference.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a C++ compiler (gcc ≥9.0 or clang ≥10.0) installed; runs on Linux and macOS only.
  • Low friction installation as a pure Python wheel.
  • Actively maintained with recent commits and supports current Python versions (3.12+).

License · maintenance · safety

ISC (permissive) — Licensed under ISC, a permissive open-source license. You can use, modify, and distribute PyStan with minimal restrictions, suitable for both academic and commercial projects.

last release 2026-03-12 (155 days) · last repo commit 2026-08-05 · 366 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,440,233 downloads/mo, #3,892 on PyPI

Verify before relying

pip install pystan

import pystan

schools_code = """data { int<lower=0> J; }"""
schools_data = {"J": 8}
posterior = pystan.build(schools_code, data=schools_data)
fit = posterior.sample(num_chains=4, num_samples=1000)
  • Whether Windows support is available or planned
  • Performance characteristics for large models or datasets
  • Specific use of GPU acceleration or distributed computing
Same gist for agents: .md · .json

What it is and what it does

PyStan is a Python interface to Stan, a platform for Bayesian statistical modeling and computation. It lets you define probabilistic models in Stan's modeling language, then compile and sample from them in Python. The package handles model compilation caching and sample caching automatically, reducing redundant computation.

Typical workflows involve writing a Stan model specification that defines data, parameters, and model structure, passing it to PyStan with your data, and drawing posterior samples via Markov chain Monte Carlo. Results can be extracted as arrays or converted to pandas DataFrames for analysis. It's used in social sciences, biology, physics, engineering, and business for statistical inference where you need to quantify uncertainty in model parameters.

Use it for

  • Fit hierarchical Bayesian models to experimental or observational data with uncertainty quantification
  • Conduct prior sensitivity analysis and posterior predictive checks for model validation
  • Estimate treatment effects, causal parameters, or latent variables in complex statistical models
  • Build time-series or spatial models with structured priors and dependencies
  • Perform model comparison and selection using posterior samples

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need Bayesian inference.

PyStan is actively maintained, has no known vulnerabilities, and is widely trusted in research and industry. The main requirement is a C++ compiler on your system. Worth installing for any project involving probabilistic modeling, uncertainty quantification, or hierarchical statistical inference.

Install

pystan on PyPI

Before you install

Low friction installation as a pure Python wheel. Actively maintained with recent commits and supports current Python versions (3.12+). Requires a C++ compiler (gcc ≥9.0 or clang ≥10.0) available on your system for model compilation.

Requires a C++ compiler (gcc ≥9.0 or clang ≥10.0) installed; runs on Linux and macOS only.

License in practice

Licensed under ISC, a permissive open-source license. You can use, modify, and distribute PyStan with minimal restrictions, suitable for both academic and commercial projects.

Quickstart

pip install pystan

import pystan

schools_code = """data { int<lower=0> J; }"""
schools_data = {"J": 8}
posterior = pystan.build(schools_code, data=schools_data)
fit = posterior.sample(num_chains=4, num_samples=1000)

Verify before relying

  • Whether Windows support is available or planned
  • Performance characteristics for large models or datasets
  • Specific use of GPU acceleration or distributed computing

Package facts

LicenseISC permissive
Python supportSupports the current Python release <4.0,>=3.12
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
aiohttphttpstanpysimdjsonnumpyclikitsetuptools
MaintenanceActively maintained 155 days since the last release
Last repo commit
First released
Downloads1,440,233 / month, #3,892 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: Science/ResearchLicense :: OSI ApprovedLicense :: OSI Approved :: ISC License (ISCL)Programming Language :: Python :: 3Programming Language :: Python :: 3.12

Evidence: pystan-3.10.1-py3-none-any.whl

Tags

Capabilities
bayesian inference pythonstan statistical modelingprobabilistic programmingmcmc samplinghierarchical bayesian modelsposterior samplingstatistical computation
Topics
bayesian-inferencestatistical-modelingprobabilistic-programming

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “stan statistical modeling”

  • pystanPyStan provides a Python interface to Stan for Bayesian statistical…
  • cmdstanpyCmdStanPy provides a pure-Python interface to the Stan probabilistic…
  • nutpienutpie provides a fast NUTS sampler for Bayesian inference on PyMC…

Give your agent the search over MCP, or paste the wish link into any chat.

More Mathematics packages

networkx Worth it
PyPI · Python Modules · released Dec 2025

NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.

BSD-3-Clausepure Python
290.9Mdownloads / mo
kiwisolver Worth it
PyPI · Mathematics · released Mar 2026

kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.

Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.

BSD-3-Clausecompiled wheel · 3.10+
205.5Mdownloads / mo
sympy Worth it
PyPI · Scientific/Engineering · released Apr 2025

SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.

BSD-3-Clausepure Python · 3.9+
196.4Mdownloads / mo
contourpy Worth it
PyPI · Information Analysis · released Jul 2025

ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.

BSD-3-Clausecompiled wheel · 3.11+
191.2Mdownloads / mo
torch With conditions
PyPI · Software Development · released Jul 2026

PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.

Apache-2.0 AND Apache-2.0 WITH LLVM-exception AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND MITcompiled wheel · 3.10+
102.5Mdownloads / mo
onnxruntime Worth it
PyPI · Software Development · released Jul 2026

onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.

Install it if you have ONNX models to run in production or development.

MITcompiled wheel · 3.11+
89.3Mdownloads / mo

See also cmdstanpy · httpstan · nutpie · pymc · numpyro · pymc3 · arviz-stats · arviz · arviz-base · arviz-plots