Summary
Importing concrete fails when following the official install instructions because setuptools v82.0.0 removed pkg_resources.
Pinning the setuptools version to e.g. 81.0.0 in the install instructions fixes this:
pip install -U pip wheel setuptools==81
pip install concrete-python
Description
- versions affected: All of them presumably, but I'm using 2.11.0
- python version: 3.12.12 (but also happened in 3.11)
- config (optional: HW, OS): MacOS 14.6.1
- workaround (optional): Pin setuptools version to anything <82.0.0, aka:
pip install setuptools==81
- proposed fix (optional): Remove pkg_resources dependency or update docs to pin setuptools to e.g. 81.0.0.
Step by step procedure someone should follow to trigger the bug:
Installing setuptools with no version requirement installs a version without pkg_resources
Following the official install instructions installs the latest version of setuptools, which is currently 82.0.0.
Setuptools 82.0.0, released on 08. Febuary 2026, removed pkg_resources, which is required in concrete-python's init.py:
# in frontends/concrete-python/concrete/__init__.py
__import__("pkg_resources").declare_namespace(__name__)
Therefore, importing concrete fails:
print("Minimal POC to reproduce the bug")
from concrete import fhe
results in
File "xxx/.venv/lib/python3.12/site-packages/concrete/__init__.py", line 1, in <module>
__import__("pkg_resources").declare_namespace(__name__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'
Summary
Importing concrete fails when following the official install instructions because setuptools v82.0.0 removed pkg_resources.
Pinning the setuptools version to e.g. 81.0.0 in the install instructions fixes this:
Description
pip install setuptools==81Step by step procedure someone should follow to trigger the bug:
Installing setuptools with no version requirement installs a version without pkg_resources
Following the official install instructions installs the latest version of setuptools, which is currently 82.0.0.
Setuptools 82.0.0, released on 08. Febuary 2026, removed pkg_resources, which is required in concrete-python's init.py:
Therefore, importing concrete fails:
results in