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

Error message when running on colab #352

Open dchen48 opened 1 year ago

dchen48 commented 1 year ago

When I run the tutorial code on colab, I got the error message "ImportError: libboost_system.so.1.65.1: cannot open shared object file: No such file or directory". Can someone tells me how to solve this issue on colab? Thanks.

sky1ove commented 1 year ago

same bug

jlm429 commented 1 year ago

I think colab python upgrade may be causing this.

https://github.com/googlecolab/colabtools/issues/3450

If you set(BOOST_PYTHON_VERSION python38) in football/third_party/gfootball_engine/CMakeLists.txt it works. Change to 3.9 or 3.10 and it breaks.

EDIT

If you edit football/third_party/gfootball_engine/CMakeLists.txt with

set(BOOST_PYTHON_VERSION python${Python3_VERSION_MAJOR})

It works fine with 3.10 and outputs the following:

Using Python: 3.10.11 -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: python Using python_boost: python -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: thread system filesystem python -- Configuring done -- Generating done -- Build files have been written to: /content/football/third_party/gfootball_engine

However, when trying import gfootball.env as football_env, I'm still getting:

ImportError: libboost_filesystem.so.1.65.1: cannot open shared object file: No such file or directory

I'm not sure why it's looking for 1.65.1 instead of 1.71.0