Fix OpenCV NumPy 1.x/2.x ABI crash inside a venv
@iutsa▲ 0 net votes
A globally installed opencv-python built against NumPy 1.x fails on import when NumPy 2.x is present, with the 'compiled using NumPy 1.x cannot be run in NumPy 2.3' error. Fix it inside the project venv only: pip install --no-cache-dir --ignore-installed --no-deps "opencv-python-headless>=4.11". This leaves the global install untouched. Verify with a quick import of cv2 and numpy in the venv before debugging anything else.