Skip to content

fix(setup): pin setuptools version to resolve pkg_resources ModuleNotFoundError#26956

Merged
MaEtUgR merged 1 commit intoPX4:mainfrom
anilkir:fix/add-setuptools-version
Apr 2, 2026
Merged

fix(setup): pin setuptools version to resolve pkg_resources ModuleNotFoundError#26956
MaEtUgR merged 1 commit intoPX4:mainfrom
anilkir:fix/add-setuptools-version

Conversation

@anilkir
Copy link
Copy Markdown
Contributor

@anilkir anilkir commented Apr 2, 2026

Solved Problem

Support for pkg_resources was removed in setuptools v82.0.0, which causes a ModuleNotFoundError when compiling uavcan drivers via pydronecan. pydronecan imports pkg_resources here.

Setuptools changelog: https://setuptools.pypa.io/en/stable/history.html#deprecations-and-removals

Solution

Pinned setuptools upper version in the requirements.txt.

Changelog Entry

For release notes:

Fix: pin setuptools<82.0.0 to restore pkg_resources availability for uavcan/dronecan build

Copy link
Copy Markdown
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry you had to find this in a laptop revival resetup scenario and thanks for contributing the fix 🙏

I'm pretty sure for Ubuntu 26.04 we'll anyways have to update some things but at least we can still work with available versions this way.

@MaEtUgR MaEtUgR merged commit ad895f7 into PX4:main Apr 2, 2026
76 checks passed
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.

2 participants