-
Notifications
You must be signed in to change notification settings - Fork 309
Description
Expected Behavior
Installing dependencies for gentle using pip should succeed without errors when using newer Python and NumPy versions.
Actual Behavior
The installation fails due to incompatibility between pomegranate==0.13.3, newer versions of NumPy (≥ 2.x), and Python (≥ 3.8). Additionally, pomegranate uses a legacy setup.py-based build (bdist_wheel), which is deprecated and often fails in newer pip environments.
Steps to Reproduce
-
Use pip install with a modern Python environment (Python 3.12+, NumPy 2.x+)
-
Attempt to install the following dependencies:
numpy==1.26.x (latest)
pomegranate==0.13.3
twisted==24.x
tornado==6.4.x -
Observe build failure related to NumPy internal fields and C extension issues
Known Working Versions (For gentle):
numpy==1.21.6
pomegranate==0.13.3
twisted==21.7.0
tornado==6.1
Root Cause
-
pomegranate==0.13.3 is not compatible with Python ≥ 3.8+ -
It relies on deprecated or removed NumPy internals such as subarray, names, fields, elsize -
These were removed in NumPy 2.x, leading to compile-time failures -
Downgrading Python and NumPy allows installation to proceed
Additional Problem
Even with proper versions:
- The build still fails in newer environments because pomegranate is installed using the legacy setup.py bdist_wheel method
- Modern pip expects PEP 517-compatible pyproject.toml-based build.
- This causes further issues with isolation and reproducibility
Now another important question. Why does the Docker image work, but cloning the GitHub repo locally and running it fails?
This is what I feel correct me if I am wrong that Docker provides a fully isolated environment with:
- Exact pinned versions of Python, pip, and all dependencies
- Pre-installed build tools and environment variables
- Cached or precompiled .whl files
In contrast, cloning the repo locally exposes the build process to new pip behavior that breaks legacy builds