Paul K
Paul K

Reputation: 51

Setting up OpenAI Gym on Windows 10

I'm trying to set up OpenAI's gym on Windows 10, so that I can do machine learning with Atari games.

On PyCharm I've successfully installed gym using Settings > Project Interpreter. But when I try to set up a breakout environment (or any other Atari game) using:

import gym
env = gym.make('BreakoutDeterministic-v4')

I get the following error:

ImportError: No module named 'atari_py'
...
HINT: you can install Atari dependencies by running 'pip install gym[atari]'

So I tried the command 'pip install gym[atari]' in the PyCharm terminal, and got the error:

Unable to execute 'make build -C atari_py/ale_interface -j 11'. HINT: are you sure `make` is installed?
error: [WinError 2] The system cannot find the file specified

I tried installing 'make' from http://gnuwin32.sourceforge.net/packages/make.htm, and tried some other methods, but this didn't solve the problem.

I've also tried 'pip install atari_py', which runs fine but also doesn't solve the problem.

Any ideas/help would be much appreciated. I'm new to Python and PyCharm, so I apologise if any of this was unclear. Please let me know if there's any more info I can provide to help.

Thanks in advance

Upvotes: 5

Views: 11534

Answers (2)

Dibran
Dibran

Reputation: 1555

We currently support Linux and OS X running Python 2.7 or 3.5 -- 3.7. Windows support is experimental - algorithmic, toy_text, classic_control and atari should work on Windows (see next section for installation instructions); nevertheless, proceed at your own risk.

https://github.com/openai/gym#supported-systems

I ended up using Windows subsystem for Linux to run OpenAI Gym with Atari on Windows 10. I have written a complete guide here.

Works great!

Upvotes: 2

CS101
CS101

Reputation: 514

The gym documentation https://github.com/openai/gym#installing-everything says that for using all the environments, you should have installed dependencies through pip install 'gym[all]'. Can you run this command preferably through the terminal and see if it works?

Upvotes: 1

Related Questions