deep-rl-class
deep-rl-class copied to clipboard
Add conditional import for pickle5 in unit-2 hands-on
This PR resolves installation failures when setting up the Unit 2 hands-on exercise requirements. The current pickle5 dependency causes build errors on Python 3.8+, since the package is no longer required for modern Python versions and Google Colab already runs Python 3.10+.
In case a student decides to do the hands-on exercise locally instead of doing it in Colab and happens to have a Python version older than 3.8, the PR code will work just as fine because of the dynamic requirement installation based on Python's version being used.
Approach:
- Uses conditional requirement:
pickle5; python_version < "3.8" - Implements graceful fallback import pattern
- Maintains compatibility with all Python versions"
Testing:
- [x] Verified installation works on Python 3.10+ (Colab environment)
- [x] Confirmed backward compatibility approach