Skip to content

check_dependencies fails on Python 3.12 due to missing pkg_resources #38003

@vaibhavgulati02

Description

@vaibhavgulati02

Description

The check_dependencies GitHub Action is failing when run with Python 3.12.
The failure occurs during execution of find_python_dependencies, which imports the requirements package. That package still depends on pkg_resources, which is no longer available by default in Python 3.12.

This causes the workflow to exit early with a ModuleNotFoundError.

check_dependencies (3.12)
failed 8 minutes ago in 25s

Error Output

Run find_python_dependencies
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.12.12/x64/bin/find_python_dependencies", line 3, in <module>
    from edx_repo_tools.find_dependencies.find_python_dependencies import main
  File "/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/edx_repo_tools/find_dependencies/find_python_dependencies.py", line 9, in <module>
    import requirements
  File "/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/requirements/__init__.py", line 19, in <module>
    from .parser import parse
  File "/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/requirements/parser.py", line 23, in <module>
    from .requirement import Requirement
  File "/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/requirements/requirement.py", line 24, in <module>
    from pkg_resources import Requirement as Req
ModuleNotFoundError: No module named 'pkg_resources'

Error: Process completed with exit code 1.

Actions URL: https://github.com/openedx/openedx-platform/actions/runs/21904915541

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