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

How can solve RuntimeError: Dynamic linking causes SDL downgrade! (compiled with version 2.28.3, linked to 2.0.16)? #365

Open
hancruyff opened this issue Oct 22, 2023 · 1 comment

Comments

@hancruyff
Copy link

hancruyff commented Oct 22, 2023

I'm using window10 anaconda environment with python3.7
but this error happened
D:\ref>python -m gfootball.play_game --action_set=full
Traceback (most recent call last):
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\site-packages\gfootball\play_game.py", line 71, in
app.run(main)
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\site-packages\absl\app.py", line 308, in run
_run_main(main, args)
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\site-packages\absl\app.py", line 254, in _run_main
sys.exit(main(argv))
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\site-packages\gfootball\play_game.py", line 55, in main
env = football_env.FootballEnv(cfg)
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\site-packages\gfootball\env\football_env.py", line 47, in init
self._players = self._construct_players(config['players'], player_config)
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\site-packages\gfootball\env\football_env.py", line 71, in construct_players
player_factory = importlib.import_module(
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\site-packages\gfootball\env\players\keyboard.py", line 18, in
import pygame
File "C:\Users\hanji\AppData\Local\Programs\Python\Python310\lib\site-packages\pygame_init
.py", line 92, in
from pygame.base import * # pylint: disable=wildcard-import; lgtm[py/polluting-import]
RuntimeError: Dynamic linking causes SDL downgrade! (compiled with version 2.28.3, linked to 2.0.16)

how can I solve this problem?
I tried pygame upgrade and uninstall and install too.

@andre-vd
Copy link

If you go into the folder where your packages are installed and search for SDL2.dll, you'll see two different SDL2.dll files. One instance in pygame and another in the GFootball package. Go to the properties of the files to see which one is version 2.28.3, and replace the older version with that version.

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