Skip to content

Add conditional import for pickle5 in unit 2 hands-on #631

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

Closed

Conversation

bodoque007
Copy link

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 needed for modern Python versions.

pickle5 is no longer required for Python >= 3.8 and Google Colab already runs Python 3.10+.
Yet, 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 code works just as fine.

Approach:

  • Uses conditional requirement: pickle5; python_version < "3.8"
  • Implements graceful fallback import pattern
  • Ensures code works on both Colab and local environments regardless of Python version

@bodoque007 bodoque007 closed this Jul 12, 2025
@bodoque007 bodoque007 force-pushed the conditional-pickle5-fix branch from 9c1d010 to f8ed470 Compare July 12, 2025 07:51
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

Successfully merging this pull request may close these issues.

1 participant