gutfeeling / practical_rl_for_coders

Learn reinforcement learning with Python, Gym and Keras.
8 stars 5 forks source link

Module 2.2 OpenAI Gym Installation #3

Closed gutfeeling closed 4 years ago

gutfeeling commented 4 years ago
  1. In this lesson, I am going to show you how to install OpenAI Gym on Ubuntu.
  2. If you use other linux flavors or MacOS, the steps are the same. However, the way you install the system libraries and the list of required system libraries is different. I will talk about where you can find the list of required system libraries when I demonstrate that part of the installation.
  3. Gym does not officially support Windows. So I recommend that you use Linux or MacOS for this course. If you insist on using Windows, I have included a link in the lecture notes which might help you.

I am on a freshly installed Ubuntu 18.04 Bionic Beaver system. Ubuntu 18.04 includes Python 3.

Installation steps

  1. Explain why virtualenv
  2. sudo apt-get install python3-venv
  3. python3 -m venv py3
  4. source py3/bin/activate
  5. OpenAI Gym dockerfile for system level dependencies
  6. sudo apt-get install unzip libglu1-mesa-dev libgl1-mesa-dev libosmesa6-dev xvfb patchelf ffmpeg
  7. pip install gym
  8. pip install gym[box2d]
  9. pip install gym[atari] (Install these step by step, not using a single command)
  10. Test installation