Skip to content

Fix: Make importlib_resources an unconditional requirement - #11234

Open
mayuriphad wants to merge 1 commit into
tensorflow:masterfrom
mayuriphad:fix-importlib-resources
Open

mayuriphad wants to merge 1 commit into
tensorflow:masterfrom
mayuriphad:fix-importlib-resources

Conversation

@mayuriphad

Copy link
Copy Markdown

This PR fixes a bug where importing tensorflow_datasets fails on Python >= 3.9 due to a missing \importlib_resources\ module. The codebase unconditionally imports from \importlib_resources.abc\ in \dataset_builder.py, but the dependency was only installed for Python < 3.9. By making it unconditional in \setup.py, this resolves the \ModuleNotFoundError. Fixes #11212.

@google-cla

google-cla Bot commented Sep 18, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

required dependency on importlib_resources missing

1 participant