RL Course Unit 1: "python setup.py egg_info did not run successfully"

Hi, I’m trying to run the second setup line for the RL Course, Unit 1:

pip install -r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt

However, I get the following error:

...
Collecting pygame==2.1.3 (from gymnasium[box2d]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 3))
  Using cached pygame-2.1.3.tar.gz (12.8 MB)
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I’ve tried solutions from other question threads and can’t seem to resolve this.

1 Like
stable-baselines3==2.0.0a5
swig
gymnasium[box2d]
huggingface_sb3

It seems that there is a problem with box2d with the gymnasium library to be installed there.

1 Like

Thanks for your response! It definitely led me in the right direction. Essentially I replaced the line

!pip install -r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt

with the following lines

!pip install stable-baselines3==2.0.0a5
!pip install swig
!pip install gymnasium
!pip install box2d-py
!pip install huggingface_sb3

which does not err and appears to install the same necessary components.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.