#787 closed enhancement (fixed)

Update scipy to a more recent version

Reported by: Chau Owned by: osgeo4w-dev@…
Priority: minor Component: Package
Version: Keywords: scipy numpy
Cc:

Description

The current version of Scipy seems to be 1.6.2-2 (about two years old), but the most recent release on github is 1.10.1.

The current version of scipy warns about the current numpy version being too new.

I haven't seen any issues between the two but it might be time for a more recent version of scipy (unless something is blocking of course)?

Regards, Casper

Change History (2)

comment:1 by tdanckaert, 13 months ago

I suggest to increase the priority of this bug. Installing (using pip) a package which requires scipy, can cause pip to downgrade numpy. This removes the OSGeo4W numpy version, and installs numpy version 1.22.4 instead.

numpy version 1.22.4 then causes GDAL command line tools to fail:

0RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
Traceback (most recent call last):
  File "C:\QGIS_3~1.3\apps\Python39\Scripts\gdal_merge.py", line 14, in <module>
    sys.exit(main(sys.argv))
  File "C:\QGIS_3~1.3\apps\Python39\Lib\site-packages\osgeo_utils\gdal_merge.py", line 632, in main
    return gdal_merge(argv)
  File "C:\QGIS_3~1.3\apps\Python39\Lib\site-packages\osgeo_utils\gdal_merge.py", line 617, in gdal_merge
    fi.copy_into(t_fh, band, band, nodata, verbose)
  File "C:\QGIS_3~1.3\apps\Python39\Lib\site-packages\osgeo_utils\gdal_merge.py", line 348, in copy_into
    return raster_copy(
  File "C:\QGIS_3~1.3\apps\Python39\Lib\site-packages\osgeo_utils\gdal_merge.py", line 95, in raster_copy
    return raster_copy_with_mask(
  File "C:\QGIS_3~1.3\apps\Python39\Lib\site-packages\osgeo_utils\gdal_merge.py", line 185, in raster_copy_with_mask
    data_src = s_band.ReadAsArray(s_xoff, s_yoff, s_xsize, s_ysize, t_xsize, t_ysize)
  File "C:\QGIS_3~1.3\apps\Python39\Lib\site-packages\osgeo\gdal.py", line 4762, in ReadAsArray
    from osgeo import gdal_array
  File "C:\QGIS_3~1.3\apps\Python39\Lib\site-packages\osgeo\gdal_array.py", line 13, in <module>
    from . import _gdal_array
ImportError: numpy.core.multiarray failed to import

comment:2 by jef, 13 months ago

Resolution: fixed
Status: newclosed

Updated to 1.10.1-1

Note: See TracTickets for help on using tickets.