[Bug 1230064] New: GDAL problem: Python3 GDAL needs to be compiled using Numpy 2
https://bugzilla.suse.com/show_bug.cgi?id=1230064 Bug ID: 1230064 Summary: GDAL problem: Python3 GDAL needs to be compiled using Numpy 2 Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: openSUSE Tumbleweed Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: screening-team-bugs@suse.de Reporter: variablestarlight@gmail.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- Tumblweed has recently updated to Numpy 2. It seems that the currently provided GDAL Python module was compiled with Numpy 1.X and would also need to be compiled using Numpy 2.
gdal_merge.py
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 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 "/usr/local/bin/gdal_merge.py", line 12, in <module> sys.exit(main(sys.argv)) File "/usr/lib64/python3.11/site-packages/osgeo_utils/gdal_merge.py", line 656, in main return gdal_merge(argv) File "/usr/lib64/python3.11/site-packages/osgeo_utils/gdal_merge.py", line 395, in gdal_merge with gdal.ExceptionMgr(): File "/usr/local/lib64/python3.11/site-packages/osgeo/gdal.py", line 213, in __enter__ from . import gdal_array File "/usr/local/lib64/python3.11/site-packages/osgeo/gdal_array.py", line 10, in <module> from . import _gdal_array Traceback (most recent call last): File "/usr/lib64/python3.11/site-packages/numpy/core/_multiarray_umath.py", line 44, in __getattr__ raise ImportError(msg) ImportError: A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 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. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230064 https://bugzilla.suse.com/show_bug.cgi?id=1230064#c1 Benjamin Greiner <code@bnavigator.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID CC| |code@bnavigator.de --- Comment #1 from Benjamin Greiner <code@bnavigator.de> --- python3-GDAL was compuled from gdal.spec on Fri Aug 30 14:09:54 UTC 2024 right after the merge of numpy2 using numpy 2 headers and is in Tumbleweed: https://build.opensuse.org/package/live_build_log/openSUSE:Factory/gdal/stan...
[ 9s] python311-numpy-2.0.0-1.2 ######################################## ... [ 10s] python311-numpy-devel-2.0.0-1.2 ######################################## ... [ 457s] Using numpy 2.0.0 ... [ 537s] Comparing python3-GDAL-3.9.2-1.1.x86_64.rpm to python3-GDAL-3.9.2-1.2.x86_64.rpm ... [ 538s] h02-ch2a finished "build gdal.spec" at Fri Aug 30 14:09:54 UTC 2024. ... [ 538s] RPMS/x86_64/python3-GDAL-3.9.2-1.2.x86_64.rpm
$ LANG=C zypper info python3-GDAL ... Information for package python3-GDAL: ------------------------------------- Repository : Haupt-Repository (OSS) Name : python3-GDAL Version : 3.9.2-1.2 Arch : x86_64 Vendor : openSUSE Installed Size : 6.9 MiB Installed : Yes Status : up-to-date Source package : gdal-3.9.2-1.2.src Upstream URL : https://www.gdal.org/ Summary : GDAL Python3 module Description : The GDAL python modules provide support to handle multiple GIS file formats.
File "/usr/local/lib64/python3.11/site-packages/osgeo/gdal_array.py"
The /local/ part indicates that you installed gdal from a different source than the rpm. Never use pip as root. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com