google-research / football

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

Installation problem with gfootball on Python 3.10 Conda environment #363

Open neuronphysics opened 10 months ago

neuronphysics commented 10 months ago

Hi,

I've been attempting to set up the gfootball environment within a Conda environment that already included other multi-agent systems requiring Python 3.10. I've encountered difficulties while trying to install gfootball from source.

Steps to Reproduce:

Error Log:

pip install -e .
Obtaining file:///home/zsheikhb/MARL/master/football
  Preparing metadata (setup.py) ... done
Requirement already satisfied: pygame>=1.9.6 in /home/.conda/envs/marl/lib/python3.10/site-packages (from gfootball==2.9) (2.5.1)
Requirement already satisfied: opencv-python in /home/.conda/envs/marl/lib/python3.10/site-packages (from gfootball==2.9) (4.8.0.76)
Requirement already satisfied: psutil in /home/.conda/envs/marl/lib/python3.10/site-packages (from gfootball==2.9) (5.9.5)
Requirement already satisfied: scipy in /home/.conda/envs/marl/lib/python3.10/site-packages (from gfootball==2.9) (1.11.2)
Requirement already satisfied: gym>=0.11.0 in /home/.conda/envs/marl/lib/python3.10/site-packages (from gfootball==2.9) (0.26.2)
Requirement already satisfied: absl-py in /home/.conda/envs/marl/lib/python3.10/site-packages (from gfootball==2.9) (1.4.0)
Requirement already satisfied: wheel in /home/.conda/envs/marl/lib/python3.10/site-packages (from gfootball==2.9) (0.41.2)
Requirement already satisfied: numpy>=1.18.0 in /home/.conda/envs/marl/lib/python3.10/site-packages (from gym>=0.11.0->gfootball==2.9) (1.24.3)
Requirement already satisfied: cloudpickle>=1.2.0 in /home/.conda/envs/marl/lib/python3.10/site-packages (from gym>=0.11.0->gfootball==2.9) (2.2.1)
Requirement already satisfied: gym-notices>=0.0.4 in /home/.conda/envs/marl/lib/python3.10/site-packages (from gym>=0.11.0->gfootball==2.9) (0.0.8)
Installing collected packages: gfootball
  Attempting uninstall: gfootball
    Found existing installation: gfootball 2.9
    Can't uninstall 'gfootball'. No files were found to uninstall.
  Running setup.py develop for gfootball
    error: subprocess-exited-with-error

    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [92 lines of output]
        running develop
        /home/.conda/envs/marl/lib/python3.10/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
        !!

                ********************************************************************************
                Please avoid running ``setup.py`` and ``easy_install``.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.

                See https://github.com/pypa/setuptools/issues/917 for details.
                ********************************************************************************

        !!
          easy_install.initialize_options(self)
        /home/.conda/envs/marl/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
        !!

                ********************************************************************************
                Please avoid running ``setup.py`` directly.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.

                See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
                ********************************************************************************

        !!
          self.initialize_options()
        running egg_info
        writing gfootball.egg-info/PKG-INFO
        writing dependency_links to gfootball.egg-info/dependency_links.txt
        writing requirements to gfootball.egg-info/requires.txt
        writing top-level names to gfootball.egg-info/top_level.txt
        reading manifest file 'gfootball.egg-info/SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        adding license file 'LICENSE'
        writing manifest file 'gfootball.egg-info/SOURCES.txt'
        running build_ext
        ~/MARL/master/football/third_party/gfootball_engine ~/MARL/master/football
        -- The C compiler identification is GNU 9.4.0
        -- The CXX compiler identification is GNU 9.4.0
        -- Check for working C compiler: /usr/bin/cc
        -- Check for working C compiler: /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: /usr/bin/c++
        -- Check for working CXX compiler: /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 (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message):
          Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
          available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
          cmake_policy command to set the policy and suppress this warning.

          FindOpenGL found both a legacy GL library:

            OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

          and GLVND libraries for OpenGL and GLX:

            OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
            OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

          OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
          compatibility with CMake 3.10 and below the legacy GL library will be used.
        Call Stack (most recent call first):
          CMakeLists.txt:24 (FIND_PACKAGE)
        This warning is for project developers.  Use -Wno-dev to suppress it.

        -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
        -- Found EGL: /usr/lib/x86_64-linux-gnu/libEGL.so
        -- Found SDL2_image: /usr/lib/x86_64-linux-gnu/libSDL2_image.so
        -- Found SDL2_ttf: /usr/lib/x86_64-linux-gnu/libSDL2_ttf.so
        -- Found SDL2_gfx: /usr/lib/x86_64-linux-gnu/libSDL2_gfx.so (found version "1.0.4")
        -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable version "3.8.10", minimum required is "3")
        Using Python: 3.8.10
        -- Could NOT find Boost: missing: python3-py38 (found /home/.conda/envs/marl/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found version "1.73.0"))
        python3-py38 not found. Trying other names.
        -- Could NOT find Boost: missing: python-py38 (found /home/conda/envs/marl/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found version "1.73.0"))
        python-py38 not found. Trying other names.
        -- Could NOT find Boost: missing: python38 (found /home/conda/envs/marl/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found version "1.73.0"))
        CMake Error at CMakeLists.txt:70 (message):
          Python boost not found

        -- Configuring incomplete, errors occurred!
        See also "/home/zsheikhb/MARL/master/football/third_party/gfootball_engine/CMakeFiles/CMakeOutput.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: Can't roll back gfootball; was not uninstalled
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [92 lines of output]
    running develop
    /home/.conda/envs/marl/lib/python3.10/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` and ``easy_install``.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://github.com/pypa/setuptools/issues/917 for details.
            ********************************************************************************

    !!
      easy_install.initialize_options(self)
    /home/.conda/envs/marl/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
            ********************************************************************************

    !!
      self.initialize_options()
    running egg_info
    writing gfootball.egg-info/PKG-INFO
    writing dependency_links to gfootball.egg-info/dependency_links.txt
    writing requirements to gfootball.egg-info/requires.txt
    writing top-level names to gfootball.egg-info/top_level.txt
    reading manifest file 'gfootball.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    adding license file 'LICENSE'
    writing manifest file 'gfootball.egg-info/SOURCES.txt'
    running build_ext
    ~/MARL/master/football/third_party/gfootball_engine ~/MARL/master/football
    -- The C compiler identification is GNU 9.4.0
    -- The CXX compiler identification is GNU 9.4.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /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: /usr/bin/c++
    -- Check for working CXX compiler: /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 (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message):
      Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
      available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
      cmake_policy command to set the policy and suppress this warning.

      FindOpenGL found both a legacy GL library:

        OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

      and GLVND libraries for OpenGL and GLX:

        OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
        OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

      OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
      compatibility with CMake 3.10 and below the legacy GL library will be used.
    Call Stack (most recent call first):
      CMakeLists.txt:24 (FIND_PACKAGE)
    This warning is for project developers.  Use -Wno-dev to suppress it.

    -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    -- Found EGL: /usr/lib/x86_64-linux-gnu/libEGL.so
    -- Found SDL2_image: /usr/lib/x86_64-linux-gnu/libSDL2_image.so
    -- Found SDL2_ttf: /usr/lib/x86_64-linux-gnu/libSDL2_ttf.so
    -- Found SDL2_gfx: /usr/lib/x86_64-linux-gnu/libSDL2_gfx.so (found version "1.0.4")
    -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable version "3.8.10", minimum required is "3")
    Using Python: 3.8.10
    -- Could NOT find Boost: missing: python3-py38 (found /home/.conda/envs/marl/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found version "1.73.0"))
    python3-py38 not found. Trying other names.
    -- Could NOT find Boost: missing: python-py38 (found /home/.conda/envs/marl/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found version "1.73.0"))
    python-py38 not found. Trying other names.
    -- Could NOT find Boost: missing: python38 (found /home/.conda/envs/marl/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found version "1.73.0"))
    CMake Error at CMakeLists.txt:70 (message):
      Python boost not found

    -- Configuring incomplete, errors occurred!
    See also "/home/MARL/master/football/third_party/gfootball_engine/CMakeFiles/CMakeOutput.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.

I observed that

Would you suggest a way to deal with this installation issue ?

Hitsuzen-maker commented 8 months ago

have you solved this problem?