peterwittek / qml-rg

Quantum Machine Learning Reading Group @ ICFO
GNU General Public License v3.0
132 stars 63 forks source link

Installation problems with Doom environment #8

Closed adauphin closed 7 years ago

adauphin commented 7 years ago

Hi,

I tried to install gym_pull (needed to set up the doom environment) on my mac but it failed. It seems that some dependencies are missing. I also tried the second method by installing ppaquette-gym-doom but I get the following error:

Regards,

Alexandre

Collecting ppaquette-gym-doom
Collecting doom-py>=0.0.11 (from ppaquette-gym-doom)
  Using cached doom-py-0.0.15.tar.gz
Requirement already satisfied: gym>=0.4.10 in ./anaconda/lib/python3.5/site-packages (from ppaquette-gym-doom)
Requirement already satisfied: numpy in ./anaconda/lib/python3.5/site-packages (from doom-py>=0.0.11->ppaquette-gym-doom)
Requirement already satisfied: requests>=2.0 in ./anaconda/lib/python3.5/site-packages (from gym>=0.4.10->ppaquette-gym-doom)
Requirement already satisfied: six in ./anaconda/lib/python3.5/site-packages (from gym>=0.4.10->ppaquette-gym-doom)
Requirement already satisfied: pyglet>=1.2.0 in ./anaconda/lib/python3.5/site-packages (from gym>=0.4.10->ppaquette-gym-doom)
Building wheels for collected packages: doom-py
  Running setup.py bdist_wheel for doom-py ... error
  Complete output from command /Users/adauphin/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-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/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/tmp257ei8o5pip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  -- The C compiler identification is AppleClang 8.0.0.8000042
  -- The CXX compiler identification is AppleClang 8.0.0.8000042
  -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
  -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
  -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
    Imported targets not available for Boost version
  Call Stack (most recent call first):
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
    CMakeLists.txt:54 (find_package)

  CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
    Imported targets not available for Boost version
  Call Stack (most recent call first):
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
    CMakeLists.txt:54 (find_package)

  CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
    Imported targets not available for Boost version
  Call Stack (most recent call first):
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
    CMakeLists.txt:54 (find_package)

  CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
    Imported targets not available for Boost version
  Call Stack (most recent call first):
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
    CMakeLists.txt:54 (find_package)

  CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
    Imported targets not available for Boost version
  Call Stack (most recent call first):
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
    CMakeLists.txt:54 (find_package)

  CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
    Imported targets not available for Boost version
  Call Stack (most recent call first):
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
    CMakeLists.txt:54 (find_package)

  CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
    Imported targets not available for Boost version
  Call Stack (most recent call first):
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
    CMakeLists.txt:54 (find_package)

  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Looking for pthread_create
  -- Looking for pthread_create - found
  -- Found Threads: TRUE
  CMake Error at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1793 (message):
    Unable to find the requested Boost libraries.

    Unable to find the Boost header files.  Please set BOOST_ROOT to the root
    directory containing Boost or BOOST_INCLUDEDIR to the directory containing
    Boost's headers.
  Call Stack (most recent call first):
    CMakeLists.txt:54 (find_package)

  -- Found BZip2: /usr/lib/libbz2.dylib (found version "1.0.6")
  -- Looking for BZ2_bzCompressInit
  -- Looking for BZ2_bzCompressInit - found
  -- Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR)
  -- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
  -- Could NOT find GME (missing:  GME_LIBRARIES GME_INCLUDE_DIR)
  -- Using system zlib
  -- Using internal jpeg library
  -- Using system bzip2 library
  -- Using internal gme library
  -- Performing Test HAVE_NO_ARRAY_BOUNDS
  -- Performing Test HAVE_NO_ARRAY_BOUNDS - Success
  -- Looking for strdup
  -- Looking for strdup - found
  -- Looking for strndup
  -- Looking for strndup - found
  -- Looking for sys/types.h
  -- Looking for sys/types.h - found
  -- Looking for stdint.h
  -- Looking for stdint.h - found
  -- Looking for stddef.h
  -- Looking for stddef.h - found
  -- Check size of char
  -- Check size of char - done
  -- Check size of short
  -- Check size of short - done
  -- Check size of int
  -- Check size of int - done
  -- Check size of long
  -- Check size of long - done
  -- /usr/include
  -- /usr/include
  -- /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/lzma/C
  -- Looking for itoa
  -- Looking for itoa - not found
  -- Performing Test DUMB_CAN_USE_SSE
  -- Performing Test DUMB_CAN_USE_SSE - Success
  -- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
  CMake Error at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
    Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
  Call Stack (most recent call first):
    /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
    cmake_modules/FindSDL2.cmake:179 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
    src/vizdoom/src/CMakeLists.txt:206 (find_package)

  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  Boost_INCLUDE_DIR (ADVANCED)
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/jpeg-6b
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/jpeg-6b
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/jpeg-6b
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/game-music-emu
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/game-music-emu
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/game-music-emu/gme
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/game-music-emu/gme
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/game-music-emu/gme
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/lzma
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/lzma
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/lzma
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/lemon
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/lemon
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/lemon
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/re2c
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/re2c
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/re2c
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/updaterevision
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/updaterevision
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/updaterevision
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/zipdir
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/zipdir
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/zipdir
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/dumb
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/dumb
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/dumb
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/gdtoa
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/gdtoa
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/gdtoa
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/wadsrc
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/wadsrc
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/wadsrc
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/src
     used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/src

  -- Configuring incomplete, errors occurred!
  See also "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/CMakeFiles/CMakeOutput.log".
  See also "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/CMakeFiles/CMakeError.log".

  Could not build doom-py: Command '['cmake', '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_PYTHON=ON', '-DBUILD_JAVA=OFF', '-DPYTHON_EXECUTABLE:FILEPATH=/Users/adauphin/anaconda/bin/python', '-DOSX_COCOA_BACKEND=OFF']' returned non-zero exit status 1. (HINT: are you sure cmake is installed? You might also be missing a library. doom_py requires boost, boost-python, sdl2 on OSX (installable via 'brew install boost boost-python sdl2')

  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/setup.py", line 88, in <module>
      include_package_data=True,
    File "/Users/adauphin/anaconda/lib/python3.5/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Users/adauphin/anaconda/lib/python3.5/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/Users/adauphin/anaconda/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/Users/adauphin/anaconda/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 179, in run
      self.run_command('build')
    File "/Users/adauphin/anaconda/lib/python3.5/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/adauphin/anaconda/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/setup.py", line 63, in run
      build_func()
    File "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/setup.py", line 34, in build_osx
      build_common('dylib', cmake_arg_list=['-DOSX_COCOA_BACKEND=OFF'])
    File "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/setup.py", line 28, in build_common
      subprocess.check_call(['cmake', '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_PYTHON=ON', '-DBUILD_JAVA=OFF', '-DPYTHON_EXECUTABLE:FILEPATH={}'.format(sys.executable)] + cmake_arg_list, cwd='doom_py')
    File "/Users/adauphin/anaconda/lib/python3.5/subprocess.py", line 581, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_PYTHON=ON', '-DBUILD_JAVA=OFF', '-DPYTHON_EXECUTABLE:FILEPATH=/Users/adauphin/anaconda/bin/python', '-DOSX_COCOA_BACKEND=OFF']' returned non-zero exit status 1

  ----------------------------------------
  Failed building wheel for doom-py
  Running setup.py clean for doom-py
Failed to build doom-py
Installing collected packages: doom-py, ppaquette-gym-doom
  Running setup.py install for doom-py ... error
    Complete output from command /Users/adauphin/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-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/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-bwc20hrp-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
      Imported targets not available for Boost version
    Call Stack (most recent call first):
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
      CMakeLists.txt:54 (find_package)

    CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
      Imported targets not available for Boost version
    Call Stack (most recent call first):
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
      CMakeLists.txt:54 (find_package)

    CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
      Imported targets not available for Boost version
    Call Stack (most recent call first):
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
      CMakeLists.txt:54 (find_package)

    CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
      Imported targets not available for Boost version
    Call Stack (most recent call first):
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
      CMakeLists.txt:54 (find_package)

    CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
      Imported targets not available for Boost version
    Call Stack (most recent call first):
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
      CMakeLists.txt:54 (find_package)

    CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
      Imported targets not available for Boost version
    Call Stack (most recent call first):
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
      CMakeLists.txt:54 (find_package)

    CMake Warning at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
      Imported targets not available for Boost version
    Call Stack (most recent call first):
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
      CMakeLists.txt:54 (find_package)

    CMake Error at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindBoost.cmake:1793 (message):
      Unable to find the requested Boost libraries.

      Unable to find the Boost header files.  Please set BOOST_ROOT to the root
      directory containing Boost or BOOST_INCLUDEDIR to the directory containing
      Boost's headers.
    Call Stack (most recent call first):
      CMakeLists.txt:54 (find_package)

    -- Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR)
    -- Could NOT find GME (missing:  GME_LIBRARIES GME_INCLUDE_DIR)
    -- Using system zlib
    -- Using internal jpeg library
    -- Using system bzip2 library
    -- Using internal gme library
    -- /usr/include
    -- /usr/include
    -- /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/lzma/C
    -- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
    CMake Error at /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
      Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
    Call Stack (most recent call first):
      /Users/adauphin/anaconda/lib/python3.5/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
      cmake_modules/FindSDL2.cmake:179 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      src/vizdoom/src/CMakeLists.txt:206 (find_package)

    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
    Please set them or make sure they are set and tested correctly in the CMake files:
    Boost_INCLUDE_DIR (ADVANCED)
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/jpeg-6b
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/jpeg-6b
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/jpeg-6b
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/game-music-emu
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/game-music-emu
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/game-music-emu/gme
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/game-music-emu/gme
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/game-music-emu/gme
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/lzma
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/lzma
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/lzma
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/lemon
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/lemon
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/lemon
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/re2c
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/re2c
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/re2c
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/updaterevision
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/updaterevision
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/updaterevision
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/zipdir
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/zipdir
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/tools/zipdir
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/dumb
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/dumb
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/dumb
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/gdtoa
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/gdtoa
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/gdtoa
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/wadsrc
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/wadsrc
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/wadsrc
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/src
       used as include directory in directory /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/src/vizdoom/src

    -- Configuring incomplete, errors occurred!
    See also "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/CMakeFiles/CMakeOutput.log".
    See also "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/doom_py/CMakeFiles/CMakeError.log".

    Could not build doom-py: Command '['cmake', '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_PYTHON=ON', '-DBUILD_JAVA=OFF', '-DPYTHON_EXECUTABLE:FILEPATH=/Users/adauphin/anaconda/bin/python', '-DOSX_COCOA_BACKEND=OFF']' returned non-zero exit status 1. (HINT: are you sure cmake is installed? You might also be missing a library. doom_py requires boost, boost-python, sdl2 on OSX (installable via 'brew install boost boost-python sdl2')

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/setup.py", line 88, in <module>
        include_package_data=True,
      File "/Users/adauphin/anaconda/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Users/adauphin/anaconda/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/Users/adauphin/anaconda/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/Users/adauphin/anaconda/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/command/install.py", line 61, in run
      File "/Users/adauphin/anaconda/lib/python3.5/distutils/command/install.py", line 539, in run
        self.run_command('build')
      File "/Users/adauphin/anaconda/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/adauphin/anaconda/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/setup.py", line 63, in run
        build_func()
      File "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/setup.py", line 34, in build_osx
        build_common('dylib', cmake_arg_list=['-DOSX_COCOA_BACKEND=OFF'])
      File "/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/setup.py", line 28, in build_common
        subprocess.check_call(['cmake', '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_PYTHON=ON', '-DBUILD_JAVA=OFF', '-DPYTHON_EXECUTABLE:FILEPATH={}'.format(sys.executable)] + cmake_arg_list, cwd='doom_py')
      File "/Users/adauphin/anaconda/lib/python3.5/subprocess.py", line 581, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_PYTHON=ON', '-DBUILD_JAVA=OFF', '-DPYTHON_EXECUTABLE:FILEPATH=/Users/adauphin/anaconda/bin/python', '-DOSX_COCOA_BACKEND=OFF']' returned non-zero exit status 1

    ----------------------------------------
Command "/Users/adauphin/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-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/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-bwc20hrp-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/dn/_yz1p9v905b9pfwz56n1q7bspnbvw6/T/pip-build-tylodmst/doom-py/
peterwittek commented 7 years ago

Please make sure that binary dependencies are installed; they are spelled out on the GitHub page. On the other hand, I have a difficult time getting it right: the code is outdated and not the highest quality. I will try to fix it over the coming days.

peterwittek commented 7 years ago

Okay, this is fairly involved, but it can be done. I got it right with Python 3.6 (system version, not in Anaconda) running on Arch Linux, but I will try it using Anaconda too. First, install every OpenAI Gym packages from PyPI:

pip install gym[all]

This enables most games, including non-trivial ones, such as Pacman. This should run fine:

import gym
env = gym.make('MsPacman-v0')
env.reset()
for _ in range(1000):
    env.render()
    env.step(env.action_space.sample()) # take a random action

Then comes the tricky part. Ensure that the dependencies of ZDoom and VizDoom are there. You don't actually need to download or compile ZDoom or VizDoom: you only need the dependencies. Once this is ensured, this should install fine:

pip install doom_py

If there are no errors, install the final Python module that you need:

pip install ppaquette-gym-doom

If your stars are lucky, you can get your agent to shoot:

import gym
import ppaquette_gym_doom
env = gym.make('ppaquette/DoomBasic-v0')
env.reset()
for _ in range(1000):
    env.render()
    env.step(env.action_space.sample()) # take a random action

Please tell me if you can get it working with Mac. Thanks.

peterwittek commented 7 years ago

To get started with the solution, clone this fork of async-rl. This is somewhat outdated, so you have to make some changes in run_a3c.py:

  1. Replace gym.envs.doom.doom_env with ppaquette_gym_doom.doom_env in line 10.
  2. Add import gym.wrappers.
  3. Change env.monitor.start(os.path.join(args.outdir, 'gym-monitor')) to env = gym.wrappers.Monitor(env, os.path.join(args.outdir, 'gym-monitor')).

In async-rl/prepare_output_dir.py, delete lines 37-50. Then, install the dependencies:

pip install chainer
pip install cached_property

Now issuing this command will train your agent:

python run_a3c.py --env ppaquette/DoomBasic-v0 --threads 4 --outdir outdir --act-filter doom-minimal

You can watch the videos in outdir as the agent learns. On my laptop, the estimated training time is 400 hours, so it does not make a great first example.

adauphin commented 7 years ago

I have installed gym[all] and all the dependencies appearing on the website, but it is still not working for the installation of doom_py. In particular, I have followed the recommendation: HINT: are you sure cmake is installed? You might also be missing a library. doom_py requires boost, boost-python, sdl2 on OSX (installable via 'brew install boost boost-python sdl2')

and installed boost, boost-python and sdl2 ( but not with homebrew).

peterwittek commented 7 years ago

It is pretty intricate and the only way I could compile it is when the VizDoom and ZDoom dependencies were all installed, along with their header files. In any case, I modified the homework to make it a lot easier to set it up -- this Doom framework is way too complicated.