openai / doom-py

ViZDoom Python wrapper
MIT License
75 stars 43 forks source link

Failing to install on second Python install #4

Closed gdb closed 8 years ago

gdb commented 8 years ago

I've installed Python3 via Homebrew's brew install python3. I'm getting:

    -- Found PythonInterp: /usr/local/opt/python3/bin/python3.5 (found suitable version "3.5.1", minimum required is "2.7")
    CMake Error at /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
      Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required
      is at least "3.5" (found
      /usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/config-3.5m/libpython3.5.dylib)
    Call Stack (most recent call first):
      /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:372 (_FPHSA_FAILURE_MESSAGE)
      /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindPythonLibs.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      CMakeLists.txt:115 (find_package)

    -- Configuring incomplete, errors occurred!
    See also "/private/var/folders/tl/1p6_zyn50q79grgz1_984r5w0000gn/T/pip-build-6ulqjxog/doom-py/doom_py/CMakeFiles/CMakeOutput.log".
    See also "/private/var/folders/tl/1p6_zyn50q79grgz1_984r5w0000gn/T/pip-build-6ulqjxog/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=/usr/local/opt/python3/bin/python3.5', '-DOSX_COCOA_BACKEND=OFF', '-DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/config-3.5m/libpython3.5.dylib']' 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')

It looks like it's unhappy with my Python dylib for some reason. Can you reproduce?

gdb commented 8 years ago

I fixed the build, but it's still not actually working:

>>> import doom_py
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/site-packages/doom_py-0.0.12-py3.5.egg/doom_py/__init__.py", line 1, in <module>
    from doom_py.vizdoom import *
ImportError: dynamic module does not define module export function (PyInit_vizdoom)

And someone from chat reports:

Traceback (most recent call last):
  File "/home/gabep/projects/openai/gym/gym/envs/doom/doom_env.py", line 10, in <module>
    import doom_py
  File "/env/python/python3/lib/python3.5/site-packages/doom_py/__init__.py", line 1, in <module>
    from doom_py.vizdoom import *
ImportError: No module named 'doom_py.vizdoom'
jietang commented 8 years ago

This should be fixed in https://github.com/openai/doom-py/commit/76bfcd40c5c864ffe01345b5431869e79089253e.