🚀 Overview
MediaPipe currently does not provide pre-built wheels for Python 3.13, and attempting to build from source results in multiple errors related to Bazel, pybind11, and ABI changes introduced in CPython 3.13.
I am trying to contribute and help make MediaPipe compatible with Python 3.13, but the build fails consistently on Windows 11.
This issue summarizes the exact environment, steps, errors, and possible fixes.
🖥️ Environment
- OS: Windows 11 (64-bit)
- Python Version: 3.13.5
- MediaPipe Version: 0.10.x (latest main branch)
- Bazel/Bazelisk Version: Latest (auto-managed by Bazelisk)
- Compiler: MSVC (Build Tools for Visual Studio 2022)
- CMake: Installed
- pip packages: numpy, protobuf, opencv-python, pybind11 (latest)
📦 Steps to Reproduce
-
Clone the repo:
git clone https://github.com/google/mediapipe
cd mediapipe
-
Set Python 3.13 paths:
set PYTHON_BIN_PATH=C:\Path\To\Python313\python.exe
set PYTHON_LIB_PATH=C:\Path\To\Python313\Lib\site-packages
-
Install dependencies:
pip install --upgrade numpy protobuf opencv-python pybind11
-
Run Bazel build:
bazel build -c opt mediapipe/python:mediapipe
❌ Actual Behavior
Build fails with errors such as:
- pybind11 internal API mismatch with CPython 3.13
- ABI-breaking changes in Python header files
- Bazel C++ toolchain incompatibility
- Missing or incompatible build rules for Python 3.13
Since Python 3.13 made notable changes to the interpreter API, C-extension build failures are expected.
I can provide full logs if needed.
✔️ Expected Behavior
- MediaPipe should compile successfully against Python 3.13
- OR provide official wheels on PyPI (
cp313)
- OR provide guidance on required patches
🙋 Contribution Offer
I am actively trying to build a working wheel for Python 3.13 and am willing to:
- Submit patches
- Test builds
- Help update Bazel rules
- Help document Python 3.13 migration
Any guidance from maintainers about the correct approach would be extremely helpful.
I will also provide a GitHub repository containing:
- Full build logs
- Applied patches
- Custom wheel
- Demo script
📝 Additional Notes
Python 3.13 will become a widely adopted version soon, and MediaPipe is used heavily in academic and production contexts. Adding compatibility early will prevent user issues when 3.13 becomes default.
Thank you for considering this!
🚀 Overview
MediaPipe currently does not provide pre-built wheels for Python 3.13, and attempting to build from source results in multiple errors related to Bazel, pybind11, and ABI changes introduced in CPython 3.13.
I am trying to contribute and help make MediaPipe compatible with Python 3.13, but the build fails consistently on Windows 11.
This issue summarizes the exact environment, steps, errors, and possible fixes.
🖥️ Environment
📦 Steps to Reproduce
Clone the repo:
git clone https://github.com/google/mediapipe cd mediapipeSet Python 3.13 paths:
Install dependencies:
Run Bazel build:
❌ Actual Behavior
Build fails with errors such as:
Since Python 3.13 made notable changes to the interpreter API, C-extension build failures are expected.
I can provide full logs if needed.
✔️ Expected Behavior
cp313)🙋 Contribution Offer
I am actively trying to build a working wheel for Python 3.13 and am willing to:
Any guidance from maintainers about the correct approach would be extremely helpful.
I will also provide a GitHub repository containing:
📝 Additional Notes
Python 3.13 will become a widely adopted version soon, and MediaPipe is used heavily in academic and production contexts. Adding compatibility early will prevent user issues when 3.13 becomes default.
Thank you for considering this!