[Osgeo4w-trac] [osgeo4w] #787: Update scipy to a more recent version

OSGeo4W trac_osgeo4w at osgeo.org
Wed May 24 02:36:34 PDT 2023


#787: Update scipy to a more recent version
------------------------+----------------------------
Reporter:  Chau         |       Owner:  osgeo4w-dev@…
    Type:  enhancement  |      Status:  new
Priority:  minor        |   Component:  Package
 Version:               |  Resolution:
Keywords:  scipy numpy  |
------------------------+----------------------------
Comment (by tdanckaert):

 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

 }}}
-- 
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/787#comment:1>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.


More information about the Osgeo4w-trac mailing list