kedro-org / kedro-plugins

First-party plugins maintained by the Kedro team.
Apache License 2.0
94 stars 90 forks source link

build(datasets): pin `numpy<2` #914

Closed merelcht closed 3 weeks ago

merelcht commented 3 weeks ago

Description

Temporarily pin numpy<2 as it's causing issues in builds like:

ImportError: 
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.2 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.

and

==================================== ERRORS ====================================
____________ ERROR collecting kedro_datasets/video/video_dataset.py ____________
kedro_datasets/video/video_dataset.py:15: in <module>
    import cv2
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/cv2/__init__.py:8: in <module>
    from .cv2 import *
E   ImportError: numpy.core.multiarray failed to import
------------------------------- Captured stderr --------------------------------
RuntimeError: module compiled against ABI version 0x1000009 but this version of numpy is 0x2000000
=========================== short test summary info ============================
ERROR kedro_datasets/video/video_dataset.py - ImportError: numpy.core.multiarray failed to import
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
============================== 1 error in 24.53s ===============================

Development notes

Checklist

astrojuanlu commented 3 weeks ago

xref https://github.com/opencv/opencv-python/issues/943