Installation#
Use Python 3.12 or 3.13. The base package requires NumPy, SciPy, pandas, emcee and h5py. Plotting and the JAX/NumPyro stack are optional dependencies.
Create and activate a virtual environment:
python -m venv .venv
. .venv/bin/activate
On Windows, use .venv\Scripts\Activate.ps1 in PowerShell instead.
Install the package version documented by this site:
python -m pip install 'jeanspy==0.1.0'
For the optional CPU inference and plotting examples:
python -m pip install 'jeanspy[numpyro_cpu,plotting]==0.1.0'
To install from the source reference used by this documentation build:
git clone https://github.com/gomeshun/jeanspy.git
cd jeanspy
git checkout 5352348369878266dce1ef2f34fc33734d268a0b
python -m pip install -e '.[numpyro_cpu,plotting]'
Inspect jeanspy.__version__ and the source reference when comparing release
and development behavior. For CUDA 12 support, use a separate environment:
python -m pip install 'jeanspy[numpyro_cuda12,plotting]==0.1.0'
Verify the effective device with jax.devices(). CUDA installation
compatibility alone does not establish that a calculation used a GPU.
Set precision and device before importing JAX or the JAX-backed JeansPy modules:
JEANSPY_JAX_PLATFORM=cpu JEANSPY_JAX_ENABLE_X64=true python your_analysis.py
Keep uv.lock, the command, source commit and runtime configuration with the
analysis. Restart identity also checks dependency and backend changes; see
storage.
Run the notebooks#
The Quickstart and tutorials are Jupyter notebooks with saved outputs. Each page has a Download this notebook link. Install a notebook frontend in the same environment as JeansPy:
python -m pip install jupyterlab
jupyter lab
Open the downloaded .ipynb, select the environment containing JeansPy, and
use Restart Kernel and Run All Cells. Each notebook contains its own setup
and synthetic inputs, so it can run without a source checkout or another
notebook’s state. The website displays saved outputs; running Python cells
requires a local Jupyter kernel.