Installation
The RydOpt software is compatible with Python ≥ 3.10. It can be installed via the pip package manager:
pip install rydopt
Tip
We strongly advise performing the installation inside a virtual environment to avoid conflicts with other Python packages. For an easy setup, even on systems where Python is not yet installed, we recommend using uv. This blazingly fast package manager is becoming increasingly popular as an alternative to pip. You can run the following commands to set up uv and install RydOpt in a new virtual environment with a recent version of Python:
# install the uv package manager
curl -LsSf https://astral.sh/uv/install.sh | sh
# create a new virtual environment in the current directory
uv venv --python 3.13
# activate the environment
source .venv/bin/activate
# install RydOpt
uv pip install rydopt
# deactivate the environment when you are done using RydOpt
deactivate
# install the uv package manager
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# create a new virtual environment in the current directory
uv venv --python 3.13
# activate the environment
.venv\Scripts\activate
# install RydOpt
uv pip install rydopt
# deactivate the environment when you are done using RydOpt
deactivate
GPU Support
If you have an NVIDIA GPU, you can install the software with GPU support:
pip install rydopt[cuda12]
To enable GPU execution in your scripts, add at the very top:
import os
os.environ["JAX_PLATFORMS"] = "cuda,cpu"
Note: While GPUs can provide orders-of-magnitude speed-ups for large and challenging optimization problems, they may slow down smaller tasks that would complete in a few seconds on a CPU.