-
Notifications
You must be signed in to change notification settings - Fork 142
Description
Bug Report: Request for TFLite Support Python 3.12+ Wheels
Description
We're experiencing issues with the tflite-support package in Python 3.12+ environments due to the lack of pre-built wheels for newer Python versions. Though the compatibility issues with the deprecated imp module have been fixed in version 0.4.4, pip is installing older incompatible versions (0.1.0a1) when attempting to install in Python 3.12 environments because no wheels are available.
Error Details
When pip installs the older version in Python 3.12, we get the following error:
ModuleNotFoundError: No module named 'imp'
This is because older versions still use the imp module in /tflite_support/flatbuffers/compat.py:19, which was deprecated in Python 3.4 and removed entirely in Python 3.12.
Reproduction Steps
- Install Python 3.12
- Run
pip install tflite-support - Attempt to import the package with
from tflite_support import metadata
Impact
This issue is blocking Ultralytics from supporting Python 3.12+. In our CI tests, model export to TFLite format fails because the metadata module can't be imported correctly. As Python 3.12 is becoming more widely adopted (and Python 3.13 is on the horizon), this will affect many projects that depend on TFLite with metadata support.
ultralytics/ultralytics#16413
CC @ultralytics/yolo-team