google-research / football

Check out the new game server:
https://research-football.dev
Apache License 2.0
3.31k stars 1.28k forks source link

[Installation] Fail to install with conda environment on Mac #342

Open LXXXXR opened 1 year ago

LXXXXR commented 1 year ago

Hi,

I'm trying to install gfootball with pip in a conda environment following compile_engine.md and I come across the following issues:

      -- Detecting CXX compile features - done
      -- Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/OpenGL.framework
      CMake Error at CMakeModules/FindPackageHandleStandardArgs.cmake:110 (MESSAGE):
        Could NOT find SDL2_image (missing: SDL2_IMAGE_LIBRARIES
        SDL2_IMAGE_INCLUDE_DIRS)
      Call Stack (most recent call first):
        CMakeModules/FindPackageHandleStandardArgs.cmake:301 (_FPHSA_FAILURE_MESSAGE)
        CMakeModules/FindSDL2_image.cmake:104 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
        CMakeLists.txt:56 (FIND_PACKAGE)

      -- Configuring incomplete, errors occurred!
      See also "/private/var/folders/h9/hrvgm2ms1vqbj81fm676_rt00000gn/T/pip-install-x0hs__f9/gfootball_5ce06935c5fb4999b2c0b998064c5633/third_party/gfootball_engine/CMakeFiles/CMakeOutput.log".
      See also "/private/var/folders/h9/hrvgm2ms1vqbj81fm676_rt00000gn/T/pip-install-x0hs__f9/gfootball_5ce06935c5fb4999b2c0b998064c5633/third_party/gfootball_engine/CMakeFiles/CMakeError.log".
      gfootball/build_game_engine.sh: line 29: pushd: third_party/gfootball_engine: No such file or directory
      error: Google Research Football compilation failed
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> gfootball

It says SDL2_image is not installed though I installed it with brew and I can see the folder /opt/homebrew/Cellar/sdl2_image.

Could you kindly give some suggestions on debugging this issue? Thank you very much.

Shred-P commented 1 year ago

same problem

heraldjose10 commented 1 year ago

Hi Did anyone find a fix for this?

LXXXXR commented 1 year ago

Hi Did anyone find a fix for this?

Not really. What I do instead is to install it on the Linux server and download the visualization....

heraldjose10 commented 1 year ago

I could fix it by pasting SDL2_image.framework folder in /Library/Frameworks folder. The installation was successful. I can run the code without rendering the game.

I guess rendering will not work on apple silicon. Where you able to get the video replays?