Skip to content

Python 3.13+ Installation Fails Due to pkg_resources/flatdict Build Dependency #494

@shyamnalluri

Description

@shyamnalluri

Problem statement

Python 3.13+ Installation Fails Due to pkg_resources/flatdict Build Dependency

Attempting to install gimme-aws-creds on Python 3.13+ fails with:

ModuleNotFoundError: No module named 'pkg_resources'
ERROR: Failed to build 'flatdict' when getting requirements to build wheel

Root cause analysis

  • Python 3.12+ no longer includes pkg_resources by default.
  • flatdict (an indirect dependency) imports pkg_resources during build.
  • This causes pip build isolation to fail on Python 3.13+.

Chosen fix and rationale

  • Audit and remove flatdict if possible, replacing with standard library or local flattening logic.
  • If not feasible, replace flatdict with a maintained alternative that supports Python 3.13+ and does not rely on pkg_resources.
  • As a fallback, use conditional dependencies or explicit build requirements as a last resort.

Compatibility verification

  • Ensure pip install gimme-aws-creds works on both Python 3.11 and 3.13.
  • No pkg_resources import errors.
  • CI passes.

Docs update

  • Update documentation to mention Python 3.13 compatibility and supported versions.

Steps to reproduce

  1. Create a clean Python 3.13+ environment.
  2. Run pip install gimme-aws-creds.
  3. Observe the pkg_resources/flatdict build failure.

Additional context

  • This is an ecosystem compatibility issue, not user misconfiguration.

References:

  • Python 3.12+ packaging changes
  • setuptools deprecation of pkg_resources
  • pip PEP 517 build isolation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions