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

Can't run basic README tutorial #65

Closed
khalld opened this issue Apr 21, 2023 · 2 comments
Closed

Can't run basic README tutorial #65

khalld opened this issue Apr 21, 2023 · 2 comments

Comments

@khalld
Copy link

khalld commented Apr 21, 2023

Hi everyone, I'm not able to run the provided example given on README. I tested with three versions of python, respectively 3.6.15, 3.7.13 , 3.11.1. I'm not able to use 3.6.0 because is not supported for Mac OS 11+ (pyenv/pyenv#2685 (comment)) . I receive an AssertionError:

After setup of rov2 and after pip install -e i try to run python train.py --policy sarl. For all version the error is the same:

/Users/danilo/GitHub/materiale-tesi/venv3615/lib/python3.6/site-packages/gym/core.py:27: UserWarning: WARN: Gym minimally supports python 3.6 as the python foundation not longer supports the version, please update your version to 3.7+
  "Gym minimally supports python 3.6 as the python foundation not longer supports the version, please update your version to 3.7+"
Output directory already exists! Overwrite the folder? (y/n)y
2023-04-21 16:47:38, INFO: Current git head hash code: %s
2023-04-21 16:47:38, INFO: Using device: cpu
2023-04-21 16:47:38, INFO: Policy: SARL w/ global state
Traceback (most recent call last):
  File "train.py", line 177, in <module>
    main()
  File "train.py", line 76, in main
    env = gym.make('CrowdSim-v0')
  File "/Users/danilo/GitHub/materiale-tesi/venv3615/lib/python3.6/site-packages/gym/envs/registration.py", line 669, in make
    env = PassiveEnvChecker(env)
  File "/Users/danilo/GitHub/materiale-tesi/venv3615/lib/python3.6/site-packages/gym/wrappers/env_checker.py", line 22, in __init__
    ), "The environment must specify an action space. https://www.gymlibrary.dev/content/environment_creation/"
AssertionError: The environment must specify an action space. https://www.gymlibrary.dev/content/environment_creation/

Anyone could help ?

@khalld
Copy link
Author

khalld commented Apr 23, 2023

The above issue is caused by an upgraded version of gym library. Works correctly with version 0.18.0, just downgrade it. Maybe could works also with Python > 3.6.15, anyone could confirm ?

@khalld khalld closed this as completed Apr 23, 2023
@xiang2020git
Copy link

The sollution works in ubuntu 20.04 with python 3.8.10. Thanks!

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