Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no module called _gameplayfootball #347

Open
siuuuuuuuuuuuuuuuuuuuuuuuuuuuuu opened this issue Mar 13, 2023 · 2 comments
Open

no module called _gameplayfootball #347

siuuuuuuuuuuuuuuuuuuuuuuuuuuuuu opened this issue Mar 13, 2023 · 2 comments

Comments

@siuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

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
Copy link

Poehavshi commented Mar 28, 2023

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants