huggingface / huggingface/deep-rl-class

[HANDS-ON BUG] Colab + Python 3.12 issues in Unit 1 (Box2D, gymnasium[box2d], and repo publish step)

Open
#678 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
5k
Forks
811
PR merge metrics
No merged PRs in 30d

Description

# Describe the bug

When completing Unit 1 of the Deep RL course on Google Colab (Python 3.12), multiple cells fail due to dependency and platform incompatibilities, particularly around Box2D environments and the model publishing step.

Specifically:

* gymnasium[box2d] fails to install on Colab with Python 3.12
* Box2D environments such as LunarLander, BipedalWalker, and CarRacing raise `ModuleNotFoundError: No module named 'Box2D'`
* box2d-py and pygame==2.1.3 fail to build from source
* Several later cells implicitly assume Box2D availability, causing repeated failures even after earlier workarounds
* The “Publish our trained model on the Hub” step fails with `403 Forbidden` unless the user manually authenticates, but this is not clearly documented and Colab does not always expose “Tools → Secrets”

I was able to complete the unit by replacing the Box2D environments with CartPole-v1, which works correctly and still satisfies the learning objectives.

Please share your notebook link so that we can reproduce the error:

https://colab.research.google.com/github/huggingface/deep-rl-class/blob/master/notebooks/unit1/unit1.ipynb

# Material

* Did you use Google Colab?
Yes

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.