I have followed the following instructions:
1 sudo apt-get update
2 sudo apt-get upgrade
3 install anaconda python 2.7
4 install pytorch for python 2.7
5 install OpenAI as follows:
sudo apt install git
git clone https://github.com/openai/gym
cd gym
pip install -e.
sudo apt-get install -y python-numpy python-dev cmake zlib1g-dev xvfb libav-tools xorg-dev python-opengl libboost-all-dev libsdl2-dev swig
pip install -e '.[all]'
Problem 1: keep getting an error when using pip install -e '.[all]' that it won't work so I read online to use pip install gym[all] instead but this gives the following error:
Requirement already satisfied: gym[all] in /home/david/gym
Requirement already satisfied: numpy>=1.10.4 in /home/david/anaconda3/envs/python2/lib/python2.7/site-packages (from gym[all])
Requirement already satisfied: requests>=2.0 in /home/david/anaconda3/envs/python2/lib/python2.7/site-packages (from gym[all])
Requirement already satisfied: six in /home/david/anaconda3/envs/python2/lib/python2.7/site-packages (from gym[all])
Requirement already satisfied: pyglet>=1.2.0 in /home/david/anaconda3/envs/python2/lib/python2.7/site-packages (from gym[all])
Collecting Box2D-kengz (from gym[all])
Collecting mujoco_py>=1.50 (from gym[all])
Using cached mujoco-py-1.50.1.42.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "
File "/tmp/pip-build-EiZ5zy/mujoco-py/setup.py", line 2, in
import importlib.util
ImportError: No module named util
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-EiZ5zy/mujoco-py/
Because some users said mujoco requires a $500 license and isn't really necessary, I Ignored this. Moving on with the instructions I then used
6 pip install ppaquette-gym-doom
7 conda install -c conda-forge ffmpeg=3.2.4
8 Install doom_py using the following:
```
git clone https://github.com/openai/doom-py.git
sudo apt-get install -y python-numpy cmake zlib1g-dev libjpeg-dev libboost-all-dev gcc libsdl2-dev wget unip
cd doom-py
python setup.py build
pip install -e.
After the second last command (python setup.py build), I get the following output in my terminal:
running build
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- filesystem
-- thread
-- system
-- date_time
-- chrono
-- regex
-- iostreams
-- atomic
CMake Deprecation Warning at cmake_modules/CreateLaunchers.cmake:48 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
src/vizdoom/CMakeLists.txt:13 (include)
-- Could NOT find GME (missing: GME_LIBRARIES GME_INCLUDE_DIR)
-- Using system zlib
-- Using system jpeg library
-- Using system bzip2 library
-- Using internal gme library
-- /usr/include
-- /usr/include
-- /home/david/Dropbox/4 - Udemy/Artificial-Intelligence-A-Z/Part 2 - Deep Convolutional Q-Learning/Module 2 - Doom/doom-py/gym/doom-py/doom_py/src/vizdoom/lzma/C
-- Checking for module 'gtk+-2.0'
-- No package 'gtk+-2.0' found
-- Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
-- Could not find FMOD include files
-- Could NOT find FluidSynth (missing: FLUIDSYNTH_LIBRARIES FLUIDSYNTH_INCLUDE_DIR)
-- Selected assembler: /usr/bin/as
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- thread
-- system
-- date_time
-- chrono
-- atomic
-- Fluid synth libs: FLUIDSYNTH_LIBRARIES-NOTFOUND
-- Using python library: /home/david/anaconda3/envs/python2/lib/libpython2.7.so
-- Using python include: /home/david/anaconda3/envs/python2/include/python2.7
CMake Warning at /home/david/anaconda3/envs/python2/lib/python2.7/site-packages/cmake/data/share/cmake-3.10/Modules/FindBoost.cmake:1610 (message):
No header defined for python-py2713; skipping header check
Call Stack (most recent call first):
CMakeLists.txt:124 (find_package)
-- Could NOT find Boost
CMake Warning at /home/david/anaconda3/envs/python2/lib/python2.7/site-packages/cmake/data/share/cmake-3.10/Modules/FindBoost.cmake:1610 (message):
No header defined for python-py27; skipping header check
Call Stack (most recent call first):
CMakeLists.txt:133 (find_package)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python-py27
-- Boost library python-py27: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so
-- Found components for NumPy
-- NUMPY_ROOT_DIR = /usr/local
-- NUMPY_INCLUDES = /home/david/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/core/include
-- NUMPY_LIBRARIES = /home/david/anaconda3/envs/kivy/lib/python2.7/site-packages/numpy/core/lib/libnpymath.a
-- NUMPY_API_VERSION = 1.12.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/david/Dropbox/4 - Udemy/Artificial-Intelligence-A-Z/Part 2 - Deep Convolutional Q-Learning/Module 2 - Doom/doom-py/gym/doom-py/doom_py
[ 0%] Built target freedoom2
[ 1%] Built target libvizdoom_static
[ 2%] Built target libvizdoom_python
[ 3%] Built target libvizdoom_shared
[ 12%] Built target gme
[ 15%] Built target lzma
[ 15%] Built target lemon
[ 17%] Built target re2c
[ 17%] Built target updaterevision
[ 18%] Built target zipdir
[ 34%] Built target dumb
[ 34%] Built target arithchk
[ 35%] Built target qnan
[ 36%] Built target gdtoa
[ 36%] Generating CMakeFiles/zdoom.dir/asm_x86_64/tmap3.o
Assembler messages:
Fatal error: can't create /home/david/Dropbox/4\ -\ Udemy/Artificial-Intelligence-A-Z/Part\ 2\ -\ Deep\ Convolutional\ Q-Learning/Module\ 2\ -\ Doom/doom-py/gym/doom-py/doom_py/src/vizdoom/src/CMakeFiles/zdoom.dir/asm_x86_64/tmap3.o: No such file or directory
src/vizdoom/src/CMakeFiles/vizdoom.dir/build.make:75: recipe for target 'src/vizdoom/src/CMakeFiles/zdoom.dir/asm_x86_64/tmap3.o' failed
make[2]: * [src/vizdoom/src/CMakeFiles/zdoom.dir/asm_x86_64/tmap3.o] Error 1
CMakeFiles/Makefile2:897: recipe for target 'src/vizdoom/src/CMakeFiles/vizdoom.dir/all' failed
make[1]: [src/vizdoom/src/CMakeFiles/vizdoom.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: ** [all] Error 2
Could not build doom-py: Command '['make', '-j', '1']' returned non-zero exit status 2. (HINT: are you sure cmake is installed? You might also be missing a library. Try running 'apt-get install -y python-numpy cmake zlib1g-dev libjpeg-dev libboost-all-dev gcc libsdl2-dev wget unzip'
Traceback (most recent call last):
File "setup.py", line 88, in
include_package_data=True,
File "/home/david/anaconda3/envs/python2/lib/python2.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/home/david/anaconda3/envs/python2/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/home/david/anaconda3/envs/python2/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/home/david/anaconda3/envs/python2/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 63, in run
build_func()
File "setup.py", line 41, in build_linux
build_common('so')
File "setup.py", line 29, in build_common
subprocess.check_call(['make', '-j', str(cores_to_use)], cwd='doom_py')
File "/home/david/anaconda3/envs/python2/lib/python2.7/subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j', '1']' returned non-zero exit status 2
I am totally lost and have been doing nothing but trying to get this to work for the best part of a week. I don't understand the problem here or why it is so much more complicated than other installations? Can anybody offer any ideas?
same error
Same error, except following https://github.com/mwydmuch/ViZDoom/blob/master/doc/Building.md#-linux. Installing by pip as suggested there did it for me.
Same issue! Has anybody been able to resolve this yet?
This looks like an issue with doom-py which is not currently maintained (https://github.com/openai/doom-py). Fortunately VizDoom now offers a python package, so please use that instead: https://github.com/mwydmuch/ViZDoom/blob/master/doc/Building.md#pypi