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

setup.py in https://www.gymlibrary.dev/content/environment_creation/#make-your-own-custom-environment #3250

Open
paapu88 opened this issue Nov 27, 2023 · 0 comments

Comments

@paapu88
Copy link

paapu88 commented Nov 27, 2023

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.py
install_requires=["gym>=0.26.0", "pygame>=2.1.0"],

Terveisin, Markus

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

1 participant