gym
gym copied to clipboard
setup.py in https://www.gymlibrary.dev/content/environment_creation/#make-your-own-custom-environment
Dear Developers,
My setup: ubuntu 23.04 Python 3.11.4 (main, Jun 9 2023, 07:59:55) [GCC 12.3.0] on linux
When running instructions for my own environment in https://www.gymlibrary.dev/content/environment_creation/#make-your-own-custom-environment
the suggested procedure:
git clone https://github.com/Farama-Foundation/gym-examples
cd gym-examples
python -m venv .env
source .env/bin/activate
pip install -e .
resulted weird errors (something pygame relatated ):
Collecting pygame==2.1.0
Using cached pygame-2.1.0.tar.gz (5.8 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using UNIX configuration...
/bin/sh: 1: sdl2-config: not found
/bin/sh: 1: sdl2-config: not found
/bin/sh: 1: sdl2-config: not found
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-twrl294f/pygame_da6cf5de6d5441a2870073dfebe5c0c0/setup.py", line 388, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "/tmp/pip-install-twrl294f/pygame_da6cf5de6d5441a2870073dfebe5c0c0/buildconfig/config.py", line 234, in main
deps = CFG.main(**kwds)
^^^^^^^^^^^^^^^^
File "/tmp/pip-install-twrl294f/pygame_da6cf5de6d5441a2870073dfebe5c0c0/buildconfig/config_unix.py", line 188, in main
DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-install-twrl294f/pygame_da6cf5de6d5441a2870073dfebe5c0c0/buildconfig/config_unix.py", line 39, in __init__
self.ver = config[0].strip()
~~~~~~^^^
IndexError: list index out of range
Hunting dependencies...
Tried to add some depencies with sudo apt install but got no help. Instead updating setup.py fixed the thing (at least installation was ok)
old line in setup.py
install_requires=["gym==0.26.0", "pygame==2.1.0"],
new line in setup.pyinstall_requires=["gym>=0.26.0", "pygame>=2.1.0"],
Terveisin, Markus