Skip to content

Installation

Prerequisites

  • Python >= 3.10
  • CUDA-capable GPU (recommended for optimization speed)

Install from Source

git clone https://github.com/vccimaging/AutoLens.git
cd AutoLens
conda create -n autolens python=3.12
conda activate autolens

# Linux and Mac
pip install torch torchvision

# Windows
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128

pip install -r requirements.txt

Verify GPU Support

import torch
print(torch.cuda.is_available())  # Should print True

Run the Demo

python 0_hello_deeplens.py

Troubleshooting

torch.cuda.is_available() returns False: Install PyTorch with CUDA support following pytorch.org.

Import errors: Make sure you're using Python >= 3.10:

python --version

Missing dependencies: Install all requirements:

pip install -r requirements.txt