-
Notifications
You must be signed in to change notification settings - Fork 983
Open
Description
Description
NumPy 2.2.6 installed via pip on Windows 64-bit shows MINGW-W64 experimental build warnings and runtime errors when used with OpenCV.
Environment
- OS: Windows 64-bit
- Python Version: 3.14.2
- NumPy Version: 2.2.6
- OpenCV Version: 4.12.0.88
- Installation Method:
pip install numpy opencv-python - Virtual Environment: Yes (venv)
Steps to Reproduce
- Create virtual environment:
python -m venv .venv - Activate:
.venv\Scripts\Activate.ps1 - Install:
pip install opencv-python(installs numpy 2.2.6 as dependency) - Run simple OpenCV code:
import cv2 as cv
img = cv.imread("image.jpg")
cv.imshow('window', img)
cv.waitKey(0)
cv.destroyAllWindows()Expected Behavior
NumPy and OpenCV should import and run without warnings.
Actual Behavior
Warning Message:
<frozen importlib._bootstrap>:491: Warning: Numpy built with MINGW-W64 on Windows 64 bits is experimental, and only available for testing. You are advised not to use it for production.
CRASHES ARE TO BE EXPECTED - PLEASE REPORT THEM TO NUMPY DEVELOPERS
Runtime Warnings:
C:\Python\.venv\Lib\site-packages\numpy\core\getlimits.py:225: RuntimeWarning: invalid value encountered in exp2
epsneg_f128 = exp2(ld(-113))
C:\Python\.venv\Lib\site-packages\numpy\core\getlimits.py:226: RuntimeWarning: invalid value encountered in exp2
tiny_f128 = exp2(ld(-16382))
C:\Python\.venv\Lib\site-packages\numpy\core\getlimits.py:240: RuntimeWarning: invalid value encountered in exp2
eps=exp2(ld(-112)),
C:\Python\.venv\Lib\site-packages\numpy\core\getlimits.py:41: RuntimeWarning: invalid value encountered in nextafter
self._smallest_subnormal = nextafter(
C:\Python\.venv\Lib\site-packages\numpy\core\getlimits.py:52: RuntimeWarning: invalid value encountered in log10
self.precision = int(-log10(self.eps))
Additional Information
pip show numpy output:
Name: numpy
Version: 2.2.6
Location: c:\Python\.venv\Lib\site-packages
Requires:
Required-by: opencv-python
What I've Tried
- Reinstalling with
--only-binary :all:flag - Clearing pip cache:
pip cache purge - Force reinstall:
pip install --force-reinstall numpy - Downgrading to numpy 1.26.4 (causes dependency conflict with opencv 4.12)
Questions
- Why is NumPy 2.2.6 on PyPI built with MINGW-W64 for Windows?
- Is there an official Windows build available?
- Should I downgrade to Python 3.11/3.12 or wait for fixes?
- What's the recommended NumPy + OpenCV combination for Windows currently?
System Details
python --version
# Python 3.14.2
pip --version
# pip 25.3
pip list
# numpy 2.2.6
# opencv-python 4.12.0.88Workaround Attempted
Tried using numpy==1.26.4 but got:
ERROR: opencv-python 4.12.0.88 requires numpy<2.3.0,>=2; python_version >= "3.9",
but you have numpy 1.26.4 which is incompatible.
Any guidance would be appreciated!
Metadata
Metadata
Assignees
Labels
No labels