You need to edit your PYTHONPATH to include the rllab directory:

export PYTHONPATH=path_to_rllab:$PYTHONPATH

Express Install

The fastest way to set up dependencies for rllab is via running the setup script.

  • On Linux, run the following:
  • On Mac OS X, run the following:

The script sets up a conda environment, which is similar to virtualenv. To start using it, run the following:

source activate rllab3

Optionally, if you would like to run experiments that depends on the Mujoco environment, you can set it up by running the following command:


and follow the instructions. You need to have the zip file for Mujoco v1.31 and the license file ready.

Manual Install


rllab assumes that you are using Anaconda Python distribution. You can download it from<>. Make sure to download the installer for Python 2.7.

System dependencies for pygame

A few environments in rllab are implemented using Box2D, which uses pygame for visualization. It requires a few system dependencies to be installed first.

On Linux, run the following:

sudo apt-get install swig
sudo apt-get build-dep python-pygame

On Mac OS X, run the following:

brew install swig sdl sdl_image sdl_mixer sdl_ttf portmidi

System dependencies for scipy

This step is only needed under Linux:

sudo apt-get build-dep python-scipy

Install Python modules

conda env create -f environment.yml