Skip to content

(Legacy) Install OpenAI Gym#

This is Legacy documentation regarding OpenAI Gym installations. Updated Gymnasium installation at: Install Gymnasium

Official page: link. Official install: link and link.

Install OpenAI Gym (Ubuntu)#

sudo -H pip install gym

Enable Box2D Simulations#

You'll need pybox2d for the Box2D Simulations. Gym 0.10.11 works well with Box2D 2.3.2. On Ubuntu 16.04 Xenial, as seen here, you'll get a lower version via apt package. Thus, better to install via pip:

Enable Atari Simulations#

You'll need this for the Atari Simulations.

sudo -H pip install gym[atari]

Enable MuJoCo and Robotics Simulations#

You'll need this for the MuJoCo Simulations and Robotics Simulations. Link: https://github.com/openai/mujoco-py/

Enable PyBullet Simulations#

The downside to MuJoCo and Robotics are the license issues. However, you can get simulations that are very similar at https://github.com/openai/gym/blob/master/docs/environments.md#pybullet-robotics-environments. Installation should be straightforward, obtaining pybullet_envs rather effortlessly:

sudo -H pip install pybullet