Q&A
###前提・実現したいこと
pythonで機械学習の勉強をしており、OpenAI Gymを使って強化学習をしようとしています。
###発生している問題・エラーメッセージ
pipでgymをインストールするところまではできたのですが、gym[atari]というパッケージをインストールすることができなくて詰まっています。
エラーメッセージRequirement already satisfied: gym[atari] in /usr/local/lib/python3.6/site -packages Requirement already satisfied: pyglet>=1.2.0 in /usr/local/lib/python3.6/s ite-packages (from gym[atari]) Requirement already satisfied: numpy>=1.10.4 in /usr/local/lib/python3.6/s ite-packages (from gym[atari]) Requirement already satisfied: requests>=2.0 in /usr/local/lib/python3.6/s ite-packages (from gym[atari]) Requirement already satisfied: six in /usr/local/lib/python3.6/site-packag es (from gym[atari]) Collecting Pillow; extra == "atari" (from gym[atari]) Using cached Pillow-4.2.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel .macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl Collecting atari-py>=0.1.1; extra == "atari" (from gym[atari]) Using cached atari-py-0.1.1.tar.gz Requirement already satisfied: PyOpenGL; extra == "atari" in /usr/local/li b/python3.6/site-packages (from gym[atari]) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python 3.6/site-packages (from requests>=2.0->gym[atari]) Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/pyt hon3.6/site-packages (from requests>=2.0->gym[atari]) Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python3.6/ site-packages (from requests>=2.0->gym[atari]) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/pyt hon3.6/site-packages (from requests>=2.0->gym[atari]) Collecting olefile (from Pillow; extra == "atari"->gym[atari]) Building wheels for collected packages: atari-py Running setup.py bdist_wheel for atari-py ... error Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/k5/fp3bgy5145b f3yw_czcnp4zm0000gn/T/pip-build-mqilk3sm/atari-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close( );exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/k5/fp 3bgy5145bf3yw_czcnp4zm0000gn/T/tmpiceg71f2pip-wheel- --python-tag cp36: running bdist_wheel running build mkdir -p build && cd build && cmake .. && make -j4 /bin/sh: cmake: command not found make: *** [build] Error 127 Could not build atari-py: Command '['make', 'build', '-C', 'atari_py/ale _interface', '-j', '3']' returned non-zero exit status 2.. (HINT: are you sure cmake is installed? You might also be missing a library. Atari-py req uires: zlib [installable as 'apt-get install zlib1g-dev' on Ubuntu].) Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/k5/fp3bgy5145bf3yw_czcnp4zm0000gn/T/pip-bui ld-mqilk3sm/atari-py/setup.py", line 36, in <module> tests_require=['nose2'] File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Vers ions/3.6/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Vers ions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Vers ions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.6/site-packages/wheel/bdist_wheel.py", li ne 179, in run self.run_command('build') File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Vers ions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/private/var/folders/k5/fp3bgy5145bf3yw_czcnp4zm0000gn/T/pip-bui ld-mqilk3sm/atari-py/setup.py", line 16, in run subprocess.check_call(cmd) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Vers ions/3.6/lib/python3.6/subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make', 'build', '-C', 'atari_p y/ale_interface', '-j', '3']' returned non-zero exit status 2. ---------------------------------------- Failed building wheel for atari-py Running setup.py clean for atari-py Failed to build atari-py Installing collected packages: olefile, Pillow, atari-py Running setup.py install for atari-py ... error Complete output from command /usr/local/opt/python3/bin/python3.6 -u - c "import setuptools, tokenize;__file__='/private/var/folders/k5/fp3bgy514 5bf3yw_czcnp4zm0000gn/T/pip-build-mqilk3sm/atari-py/setup.py';f=getattr(to kenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.clos e();exec(compile(code, __file__, 'exec'))" install --record /var/folders/k 5/fp3bgy5145bf3yw_czcnp4zm0000gn/T/pip-3axm7y6g-record/install-record.txt --single-version-externally-managed --compile: running install running build mkdir -p build && cd build && cmake .. && make -j4 /bin/sh: cmake: command not found make: *** [build] Error 127 Could not build atari-py: Command '['make', 'build', '-C', 'atari_py/a le_interface', '-j', '3']' returned non-zero exit status 2.. (HINT: are yo u sure cmake is installed? You might also be missing a library. Atari-py r equires: zlib [installable as 'apt-get install zlib1g-dev' on Ubuntu].) Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/k5/fp3bgy5145bf3yw_czcnp4zm0000gn/T/pip-b uild-mqilk3sm/atari-py/setup.py", line 36, in <module> tests_require=['nose2'] File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Ve rsions/3.6/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Ve rsions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Ve rsions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.6/site-packages/setuptools/command/inst all.py", line 61, in run return orig.install.run(self) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Ve rsions/3.6/lib/python3.6/distutils/command/install.py", line 545, in run self.run_command('build') File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Ve rsions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Ve rsions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/private/var/folders/k5/fp3bgy5145bf3yw_czcnp4zm0000gn/T/pip-b uild-mqilk3sm/atari-py/setup.py", line 16, in run subprocess.check_call(cmd) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Ve rsions/3.6/lib/python3.6/subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make', 'build', '-C', 'atari _py/ale_interface', '-j', '3']' returned non-zero exit status 2. ---------------------------------------- Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, to kenize;__file__='/private/var/folders/k5/fp3bgy5145bf3yw_czcnp4zm0000gn/T/ pip-build-mqilk3sm/atari-py/setup.py';f=getattr(tokenize, 'open', open)(__ file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, _ _file__, 'exec'))" install --record /var/folders/k5/fp3bgy5145bf3yw_czcnp4 zm0000gn/T/pip-3axm7y6g-record/install-record.txt --single-version-externa lly-managed --compile" failed with error code 1 in /private/var/folders/k5 /fp3bgy5145bf3yw_czcnp4zm0000gn/T/pip-build-mqilk3sm/atari-py/
###該当のソースコード
python
1pip3 install gym[atari]
###試したこと
brewから入れたものと、python.orgから入れたものの両方で試したのですが、同じエラーが出ました。
###補足情報(言語/FW/ツール等のバージョンなど)
MacOSで、python, pipは全て最新バージョンです。
回答1件
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
2017/09/10 12:53
2017/09/10 13:00 編集
2017/09/10 14:02
2017/09/10 14:07
2017/09/10 14:41
2017/09/10 15:00