Install with pip#

Use an isolated environment so this installation does not change packages used by your other projects.

Create an environment#

On Linux or macOS, with Python 3.12 installed:

python3.12 -m venv autolens-env
source autolens-env/bin/activate

On Windows, in Command Prompt:

py -3.12 -m venv autolens-env
autolens-env\Scriptsctivate.bat

If you use a different supported Python version, substitute it in the environment-creation command. See Python’s environment guide for other shells, including PowerShell.

Install#

python -m pip install --upgrade pip
python -m pip install autolens

For GPU support, follow GPU setup in the same environment.

Check the installation#

python -m pip check
python -c "import autolens; print(autolens.__version__)"

pip check should report no broken requirements, and the second command should print the installed version. Resolve errors using Troubleshooting before continuing.

Next, download the workspace and run an example.

Workspace#

Download the workspace and run your first example.

Numba#

See Numba and optional CPU acceleration.

Optional#

See interferometer packages.

JAX & GPU#

See JAX and GPU setup.

Legacy Python versions#

See older Python versions.