Installation#

Local installation (uv)#

We recommend using the uv package manager. To install, use

macOS and Linux#

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows#

Use irm to download the script and execute it with iex:

PS> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Then, ptyrax may be added to your uv-managed environment using

uv add git+https://github.com/ssenhorst/ptyrax

Then, to run the base version of ptyrax without GPU support, use

uv run ptyrax [reconstruct, simulate, experiment] [PTYCHOGRAM] [OUTPUT_FILENAME] [OPTIONS]

If you wish to make use of the GPU, you must install the CUDA-enabled version of jax. Instead use

uv run --extra "cuda" ptyrax [reconstruct, simulate, experiment] [PTYCHOGRAM] [OUTPUT_FILENAME] [OPTIONS]

Local installation (pip)#

To install the package locally, use

python3 -m venv .venv
source ./.venv/bin/activate

to create and activate a virtual environment. To install non-GPU version, use

python3 -m pip install .

and for the GPU version use

python3 -m pip install .[cuda]