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

no module called _gameplayfootball #347

Open siuuuuuuuuuuuuuuuuuuuuuuuuuuuuu opened 1 year ago

siuuuuuuuuuuuuuuuuuuuuuuuuuuuuu commented 1 year ago

I downloaded the zip files for the code as the pip download didn't work on my Mac and I got this issue: WARNING:root:Looks like game engine is not compiled, please run: WARNING:root: pushd /Users/nikkiclarke/tryneat/gfootball_engine && cmake . && make -j nproc && popd WARNING:root: pushd /Users/nikkiclarke/tryneat/gfootball_engine && ln -s libgame.so _gameplayfootball.so && popd Traceback (most recent call last): File "/Users/nikkiclarke/tryneat/aiplayfoot.py", line 1, in import gfootball.env as football_env File "/Users/nikkiclarke/tryneat/gfootball/init.py", line 17, in from gfootball.env import scenario_builder File "/Users/nikkiclarke/tryneat/gfootball/env/init.py", line 21, in from gfootball.env import config File "/Users/nikkiclarke/tryneat/gfootball/env/config.py", line 24, in import gfootball_engine as libgame File "/Users/nikkiclarke/tryneat/gfootball_engine/init.py", line 39, in from _gameplayfootball import * ModuleNotFoundError: No module named '_gameplayfootball'

I looked through my device and I can't find any '_gameplayfootball' has anyone else seen this issue before?

Poehavshi commented 1 year ago

According to File "/Users/nikkiclarke/tryneat/gfootball_engine/init.py" and warning at the start:

try:
  from _gameplayfootball import *
except:
  if not (os.path.isfile(os.path.join(game_path, 'libgame.so')) and
          os.path.isfile(os.path.join(game_path, '_gameplayfootball.so'))):
    logging.warning('Looks like game engine is not compiled, please run:')
    engine_path = os.path.abspath(os.path.dirname(__file__))
    logging.warning(
        '  pushd {} && cmake . && make -j `nproc` && popd'.format(game_path))
    logging.warning('  pushd {} && ln -s libgame.so '
                    '_gameplayfootball.so && popd'.format(engine_path))
  raise

You need to compile game engine with

pushd /Users/nikkiclarke/tryneat/gfootball_engine && cmake . && make -j `nproc` && popd
pushd /Users/nikkiclarke/tryneat/gfootball_engine && ln -s libgame.so _gameplayfootball.so && popd
siuuuuuuuuuuuuuuuuuuuuuuuuuuuuu commented 1 year ago

This isn't working. I'm using a mac is there a way to download it using the pip install. NOTE: the method given doesn't work I get this error:

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

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

yuanxpy commented 3 months ago

I encountered the same problem

I downloaded the zip files for the code as the pip download didn't work on my Mac and I got this issue: WARNING:root:Looks like game engine is not compiled, please run: WARNING:root: pushd /Users/nikkiclarke/tryneat/gfootball_engine && cmake . && make -j nproc && popd WARNING:root: pushd /Users/nikkiclarke/tryneat/gfootball_engine && ln -s libgame.so _gameplayfootball.so && popd Traceback (most recent call last): File "/Users/nikkiclarke/tryneat/aiplayfoot.py", line 1, in import gfootball.env as football_env File "/Users/nikkiclarke/tryneat/gfootball/init.py", line 17, in from gfootball.env import scenario_builder File "/Users/nikkiclarke/tryneat/gfootball/env/init.py", line 21, in from gfootball.env import config File "/Users/nikkiclarke/tryneat/gfootball/env/config.py", line 24, in import gfootball_engine as libgame File "/Users/nikkiclarke/tryneat/gfootball_engine/init.py", line 39, in from _gameplayfootball import * ModuleNotFoundError: No module named '_gameplayfootball'

I looked through my device and I can't find any '_gameplayfootball' has anyone else seen this issue before?

I encountered the same problem, can you tell me how do you solve this problem?