Poor compatibility with Python 3.14+NumPy 2.3.3
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- numpy, python
- Domain
- build-system
Research direction
No repository files or tests are named. Start by reproducing the cv2 import with Python 3.14 and NumPy 2.3.3, then inspect the package build and dependency metadata for the generated wheel. Done means the package imports successfully and its declared NumPy requirements match runtime compatibility.
Written by the indexing model from the issue text.
Description
This issue was raised last year, but the version involved was Py 3.10 and 3.11, so an additional issue is being proposed for compatibility with the new version.
Python 3.14.0 (tags/v3.14.0:ebf955d, Oct 7 2025, 10:15:03) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.3.3 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "R:\Python314\Lib\_pyrepl\main.py", line 58, in interactive_console
run_multiline_interactive_console(console)
File "R:\Python314\Lib\_pyrepl\simple_interact.py", line 151, in run_multiline_interactive_console
more = console.push(_strip_final_indent(statement), filename=input_name, _symbol="single") # type: ignore[call-arg]
File "R:\Python314\Lib\code.py", line 324, in push
more = self.runsource(source, filename, symbol=_symbol)
File "R:\Python314\Lib\_pyrepl\console.py", line 226, in runsource
result = self.runcode(code)
File "R:\Python314\Lib\_pyrepl\console.py", line 181, in runcode
exec(code, self.locals)
File "<python-input-0>", line 1, in <module>
import cv2
File "W:\cv2\__init__.py", line 181, in <module>
bootstrap()
File "W:\cv2\__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "R:\Python314\Lib\importlib\__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
AttributeError: _ARRAY_API not found
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
import cv2
File "W:\cv2\__init__.py", line 181, in <module>
bootstrap()
~~~~~~~~~^^
File "W:\cv2\__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "R:\Python314\Lib\importlib\__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: numpy.core.multiarray failed to import
>>>
after downgraded to np1.26.4:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
opencv-contrib-python 4.13.0.90 requires numpy>=2; python_version >= "3.9", but you have numpy 1.26.4 which is incompatible.
opencv-python 4.13.0.90 requires numpy>=2; python_version >= "3.9", but you have numpy 1.26.4 which is incompatible.
(note:it requires numpy2 while installation, but numpy 1 during runtime)
(WHAT THE F**K IS THIS???
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1k
- Avg merge
- 22h 17m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opencv/opencv-python
-
[DOC] README file Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
opencv/opencv-python#1217 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
opencv/opencv-python#1165 · 2 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
opencv/opencv-python#1273 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
opencv/opencv-python#1272 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
opencv/opencv-python#1268 · 1 comment ·
All issues in opencv/opencv-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·