Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(datasets): pin numpy<2 #914

Merged
merged 3 commits into from
Oct 28, 2024
Merged

build(datasets): pin numpy<2 #914

merged 3 commits into from
Oct 28, 2024

Conversation

merelcht
Copy link
Member

@merelcht merelcht commented Oct 28, 2024

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

  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the relevant RELEASE.md file
  • Added tests to cover my changes
  • Received approvals from at least half of the TSC (required for adding a new, non-experimental dataset)

Signed-off-by: Merel Theisen <[email protected]>
Signed-off-by: Merel Theisen <[email protected]>
@merelcht merelcht changed the title Bump videodataset dependency build(datasets): Bump videodataset dependency Oct 28, 2024
@merelcht merelcht changed the title build(datasets): Bump videodataset dependency build(datasets): pin numpy<2 Oct 28, 2024
@merelcht merelcht marked this pull request as ready for review October 28, 2024 14:40
@astrojuanlu
Copy link
Member

xref opencv/opencv-python#943

@merelcht merelcht merged commit a5ade9e into main Oct 28, 2024
15 of 16 checks passed
@merelcht merelcht deleted the fix/import-error-310 branch October 28, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants