Supported Python versions

Lightly SSL requires Python 3.7+. We recommend installing Lightly SSL in a Linux or OSX environment.

Installing Lightly SSL

You can install Lightly SSL and its dependencies from PyPi with:

pip install lightly

We strongly recommend that you install Lightly SSL in a dedicated virtualenv, to avoid conflicting with your system packages.


Lightly SSL currently uses PyTorch as the underlying deep learning framework. On top of PyTorch we use Hydra for managing configurations and PyTorch Lightning for training models.

If you want to work with video files you need to additionally install PyAV.

pip install av

If you want to work use the Masked Autoencoder you need to additionally install TIMM.

pip install "timm>=0.9.9"

Next Steps

Start with one of our tutorials: Tutorial 1: Structure Your Input