From 19a9c9b97e87567d4e2f1f99cacbb149800d16fb Mon Sep 17 00:00:00 2001 From: Mulham Fetna Date: Sat, 9 May 2026 20:47:59 +0300 Subject: [PATCH] fix: add explicit NumPy version constraints for Python 3.13+ and 3.14 - Changed install_requires to specify minimum numpy versions per Python version: - Python 3.9-3.12: numpy>=2.0.2 - Python 3.13: numpy>=2.1.3 - Python 3.14+: numpy>=2.3.0 - This fixes NumPy 2.x ABI compatibility issue where wheels compiled against NumPy 1.x fail at runtime with NumPy 2.x Fixes opencv/opencv-python#1201 --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d0c57b48..952f37ce 100755 --- a/setup.py +++ b/setup.py @@ -24,7 +24,9 @@ def main(): install_requires = [ 'numpy<2.0; python_version<"3.9"', - 'numpy>=2; python_version>="3.9"', + 'numpy>=2.0.2; python_version>="3.9" and python_version<"3.13"', + 'numpy>=2.1.3; python_version>="3.13" and python_version<"3.14"', + 'numpy>=2.3.0; python_version>="3.14"', ] python_version = cmaker.CMaker.get_python_version()