В настоящее время я пытаюсь использовать модуль Atari для тренажерного зала / openai. Мне удалось установить зависимость.
Patricks-MacBook-Pro:~ patrickmaynard$ python3.6 -m pip install gym[atari]
Requirement already satisfied: gym[atari] in /usr/local/lib/python3.6/site-packages (0.10.5)
Requirement already satisfied: six in /usr/local/lib/python3.6/site-packages (from gym[atari]) (1.11.0)
Requirement already satisfied: pyglet>=1.2.0 in /usr/local/lib/python3.6/site-packages (from gym[atari]) (1.3.2)
Requirement already satisfied: requests>=2.0 in /usr/local/lib/python3.6/site-packages (from gym[atari]) (2.18.4)
Requirement already satisfied: numpy>=1.10.4 in /usr/local/lib/python3.6/site-packages (from gym[atari]) (1.14.3)
Requirement already satisfied: Pillow; extra == "atari" in /usr/local/lib/python3.6/site-packages (from gym[atari]) (5.1.0)
Requirement already satisfied: PyOpenGL; extra == "atari" in /usr/local/lib/python3.6/site-packages (from gym[atari]) (3.1.0)
Requirement already satisfied: atari-py>=0.1.1; extra == "atari" in /usr/local/lib/python3.6/site-packages (from gym[atari]) (0.1.1)
Requirement already satisfied: future in /usr/local/lib/python3.6/site-packages (from pyglet>=1.2.0->gym[atari]) (0.16.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests>=2.0->gym[atari]) (2018.4.16)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests>=2.0->gym[atari]) (1.22)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests>=2.0->gym[atari]) (3.0.4)
Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests>=2.0->gym[atari]) (2.6)
Однако, когда я пытаюсь запустить файл, компилятор не может найти модуль, и я получаю следующую ошибку:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/atari/atari_env.py", line 9, in <module>
import atari_py
ModuleNotFoundError: No module named 'atari_py'
Во время обработки вышеуказанного исключения произошло другое исключение:
Traceback (most recent call last):
File "/Users/patrickmaynard/TicTacToe/recipe-578816-1.py", line 170, in <module>
env = gym.make('Pong-v0')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/registration.py", line 167, in make
return registry.make(id)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/registration.py", line 119, in make
env = spec.make()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/registration.py", line 85, in make
cls = load(self._entry_point)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/registration.py", line 14, in load
result = entry_point.load(False)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2291, in load
return self.resolve()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/atari/__init__.py", line 1, in <module>
from gym.envs.atari.atari_env import AtariEnv
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/atari/atari_env.py", line 11, in <module>
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]'.)
тренажерный зал и cmake уже установлены.