Reputation: 41
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?
Upvotes: 2
Views: 3392
Reputation: 11
On Mac OSX Catalina
pip3 install 'gym[atari]'
worked for me
Upvotes: 1
Reputation: 93
I had the same problem, this worked for me:
pip install 'gym[atari]'
Upvotes: 9