2

I'm new to OpenAI gym. I've successfully installed OpenAI gym on my Mac OS X (High Sierra 10.13.3) laptop and made a DQN for the CartPole game. I'm trying to install the Atari dependency to use MsPacman. I tried:

$ pip install gym[atari]

And get that Atari is successfully installed (I see atari_py in the same directory as gym and atari within the gym directory). But when I run the code I get:

raise error.DependencyNotInstalled("{}. (HINT: you can install Atari dependencies by running 'pip install gym[atari]'.)".format(e))
gym.error.DependencyNotInstalled: No module named atari_py. (HINT: you can install Atari dependencies by running 'pip install gym[atari]'.)

If I add:

import atari_py

to the source file, I get:

  File "dqn.py", line 9, in <module>
    import atari_py
ImportError: No module named atari_py

Edit: as per the documentation, I also tried

pip install -e '.[atari]'

And I get:

Directory '.' is not installable. File 'setup.py' not found.

Any thoughts?

3 Answers 3

9

I had the same problem, this worked for me:

pip install 'gym[atari]'
1

On Mac OSX Catalina pip3 install 'gym[atari]' worked for me

0

From the OpenAI Gym docs you can try

pip install -e '.[atari]'
1
  • I tried that too (edit to mention in original post) and I get: Directory '.' is not installable. File 'setup.py' not found.
    – Julia
    Apr 21, 2018 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.