Conversation

rostan-t

Free-threaded Python does not support the Limited C API.1

This PR should make it possible to build OpenCV wheels for Python 3.13t (#1029).

Footnotes

  1. https://docs.python.org/3/howto/free-threading-extensions.html#limited-c-api-and-stable-abi

@rostan-trostan-t force-pushed the ft-python-limited-api branch from ea2620b to 8d3e661 Compare March 17, 2025 10:22
@rostan-t

With this change, I was able to build a wheel for free-threaded Python with both pip wheel . and python setup.py bdist_wheel. It works with Python 3.13.2t, and I also tested it with older versions.

Is there any additional information I can provide to help move this forward?

@wk-xbkaishui

hello, how to run the build process

@rostan-t

hello, how to run the build process

This PR allows installing the library for free-threaded Python the same way as any version. This can be done like this:

pip install git+https://.com/rostan-t/opencv-python.git@ft-python-limited-api

I can confirm that it works on x86_64 Linux but I haven't tried on other platforms.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.