-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Summary
PyBioNetGen 0.8.3 fails to run when installed in an environment with
modern setuptools (≥81).
The failure is due to removal of pkg_resources from setuptools, while
PyBioNetGen still imports:
from pkg_resources import packagingThis causes a runtime ModuleNotFoundError.
Environment
- macOS (Darwin)
- Python 3.12
- PyBioNetGen 0.8.3
- setuptools 82.0.1
- Installed in a clean virtual environment
Error
Running:
bionetgen --versionProduces:
Traceback (most recent call last):
File ".../.venv/bin/bionetgen", line 4, in <module>
from bionetgen.main import main
File ".../site-packages/bionetgen/main.py", line 21, in <module>
from pkg_resources import packaging
ModuleNotFoundError: No module named 'pkg_resources'
Direct import also fails:
python -c "import pkg_resources"ModuleNotFoundError: No module named 'pkg_resources'
Root Cause
As of setuptools 81+, pkg_resources has been removed.
PyBioNetGen currently imports:
from pkg_resources import packagingThis dependency no longer works with modern Python packaging stacks.
Temporary Workaround
Downgrade setuptools:
pip install "setuptools<81"After downgrading, PyBioNetGen runs normally.
Proposed Fix
Replace usage of:
from pkg_resources import packagingWith:
from packaging import versionAnd add packaging as a direct dependency in pyproject.toml or
setup.py.
This removes reliance on deprecated pkg_resources and restores
compatibility with modern setuptools and Python 3.12+.
Impact
- Breaks fresh Python 3.12 installations
- Breaks modern virtual environments
- Affects users using uv, pip, conda, or other modern packaging
toolchains
Recommendation
- Remove dependency on
pkg_resources - Depend directly on
packaging - Add CI testing against Python 3.12 and latest setuptools
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels