[英]OpenAI gym: Trouble installing Atari dependency (Mac OS X)
I'm new to OpenAI gym.我是 OpenAI 健身房的新手。 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.
我已经在 Mac OS X(High Sierra 10.13.3)笔记本电脑上成功安装了 OpenAI 健身房,并为 CartPole 游戏制作了 DQN。 I'm trying to install the Atari dependency to use MsPacman.
我正在尝试安装 Atari 依赖项以使用 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).并获得 Atari 已成功安装(我看到 atari_py 与gym 和atari 在gym 目录中的同一目录中)。 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?有什么想法吗?
我遇到了同样的问题,这对我有用:
pip install 'gym[atari]'
在 Mac OSX Catalina pip3 install 'gym[atari]'
对我pip3 install 'gym[atari]'
从OpenAI Gym 文档中,您可以尝试
pip install -e '.[atari]'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.