OpenAI gym: Trouble installing Atari dependency (Mac OS X)

题意:

使用OpenAI Gym库时,安装Atari环境可能会遇到一些依赖问题,尤其是在Mac OS X系统上

问题背景:

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:

我是OpenAI Gym的新手。我已经成功在我的Mac OS X(High Sierra 10.13.3)笔记本电脑上安装了OpenAI Gym,并为CartPole游戏制作了一个DQN(深度Q网络)。我现在正尝试安装Atari依赖项以使用MsPacman。我尝试了以下方法:

python 复制代码
$ 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:

并且我已经成功安装了Atari(我在gym目录中的与gym和atari相同的目录下看到了atari_py)。但是当我运行代码时,我得到了:

python 复制代码
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: 如果我添加

python 复制代码
import atari_py

to the source file, I get: 添加到源文件,后得到如下信息

python 复制代码
File "dqn.py", line 9, in <module>
    import atari_py
ImportError: No module named atari_py

Edit: as per the documentation, I also tried

编辑:根据文档,我也尝试了

python 复制代码
pip install -e '.[atari]'

And I get: 得到以下信息

python 复制代码
Directory '.' is not installable. File 'setup.py' not found.

Any thoughts?

有什么想法吗?

问题解决:

I had the same problem, this worked for me:

我也遇到了同样的问题,这样解决了我的问题:

python 复制代码
pip install 'gym[atari]'
相关推荐
拓端研究室TRL几秒前
Python与MySQL网站排名数据分析及多层感知机MLP、机器学习优化策略和地理可视化应用|附AI智能体数据代码
人工智能·python·mysql·机器学习·数据分析
小哈里5 分钟前
【pypi镜像源】使用devpi实现python镜像源代理(缓存加速,私有仓库,版本控制)
开发语言·python·缓存·镜像源·pypi
全栈派森14 分钟前
云存储最佳实践
后端·python·程序人生·flask
ayiya_Oese18 分钟前
[模型部署] 1. 模型导出
图像处理·python·深度学习·神经网络·视觉检测
电商数据girl18 分钟前
酒店旅游类数据采集API接口之携程数据获取地方美食品列表 获取地方美餐馆列表 景点评论
java·大数据·开发语言·python·json·旅游
天天打码19 分钟前
python版本管理工具-pyenv轻松切换多个Python版本
开发语言·python
楠奕25 分钟前
python中使用neo4j
开发语言·python·neo4j
zybsjn30 分钟前
后端系统做国际化改造,生成多语言包
java·python·c#
南斯拉夫的铁托37 分钟前
labelimg安装及使用指南(yolo)
开发语言·python·yolo
不许哈哈哈1 小时前
基于百度云ORC与阿里大语言模型的自动评分系统
python·语言模型·百度云