kengz/SLM-Lab

Exception: pyglet 2.0.0 requires Python 3.8 or newer

jefalcon opened this issue · 1 comments

Exception: pyglet 2.0.0 requires Python 3.8 or newer.
After launch this command for the demo "python run_lab.py slm_lab/spec/demo.json dqn_cartpole dev" i get this error
"Exception: pyglet 2.0.0 requires Python 3.8 or newer."
I.ve checked tha the python version in the lab conda environment is 3.7.3

To Reproduce

  1. OS Linux Mint 21:
  2. python run_lab.py slm_lab/spec/demo.json dqn_cartpole dev

Error logs
Traceback (most recent call last):
File "run_lab.py", line 99, in
main()
File "run_lab.py", line 91, in main
get_spec_and_run(*args)
File "run_lab.py", line 75, in get_spec_and_run
run_spec(spec, lab_mode)
File "run_lab.py", line 58, in run_spec
Trial(spec).run()
File "/home/javi/Code/AI/RL/foundation/SLM-Lab/slm_lab/experiment/control.py", line 179, in run
session_metrics_list = self.run_sessions()
File "/home/javi/Code/AI/RL/foundation/SLM-Lab/slm_lab/experiment/control.py", line 157, in run_sessions
session_metrics_list = [Session(spec).run()]
File "/home/javi/Code/AI/RL/foundation/SLM-Lab/slm_lab/experiment/control.py", line 118, in run
self.run_rl()
File "/home/javi/Code/AI/RL/foundation/SLM-Lab/slm_lab/experiment/control.py", line 90, in run_rl
state = self.env.reset()
File "/home/javi/Code/AI/RL/foundation/SLM-Lab/slm_lab/env/openai.py", line 62, in reset
self.u_env.render()
File "/home/javi/anaconda3/envs/lab/lib/python3.7/site-packages/gym/core.py", line 249, in render
return self.env.render(mode, **kwargs)
File "/home/javi/anaconda3/envs/lab/lib/python3.7/site-packages/gym/core.py", line 249, in render
return self.env.render(mode, **kwargs)
File "/home/javi/anaconda3/envs/lab/lib/python3.7/site-packages/gym/envs/classic_control/cartpole.py", line 150, in render
from gym.envs.classic_control import rendering
File "/home/javi/anaconda3/envs/lab/lib/python3.7/site-packages/gym/envs/classic_control/rendering.py", line 17, in
import pyglet
File "/home/javi/anaconda3/envs/lab/lib/python3.7/site-packages/pyglet/init.py", line 54, in
raise Exception(f"pyglet {version} requires Python {MIN_PYTHON_VERSION_STR} or newer.")
Exception: pyglet 2.0.0 requires Python 3.8 or newer.

Using pip uninstall pyglet2.0.0, then, install pyglet1.5.27