Opened 3 months ago

Last modified 2 months ago

#868 new defect

python3-rasterio broken in latest release

Reported by: Christina Ratcliff Owned by: osgeo4w-dev@…
Priority: critical Component: Package
Version: Keywords:
Cc:

Description

After installing python3-rasterio, import rasterio fails with

>>> import rasterio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\PROGRA~1\QGIS34~1.2\apps\Python312\Lib\site-packages\rasterio\__init__.py", line 25, in <module>
    from rasterio._base import DatasetBase
ImportError: DLL load failed while importing _base: The specified procedure could not be found.

Change History (7)

comment:1 by andreaerdna, 3 months ago

I cannot replicate the issue on my Windows 10 system with qgis 3.40.3-1, gdal 3.10.1-1, python3-rasterio 1.4.3-1. Have you used the OSGeo4W Network installer or the QGIS standalone installer?

comment:2 by Christina Ratcliff, 3 months ago

I have tried to install python3-rasterio 1.4.3-1 with both the OSGeo4W Network installer and the QGIS standalone and get the same error.

From existing install using OsGeo4W on Windows 10

QGIS 3.40.2-Bratislava GDAL 3.9.3
LTR 3.34.14-Prizren GDAL 3.9.3

From Standalone Installer on Windows Server 2016 VM with fresh QGIS installs.

QGIS 3.40.2-Bratislava GDAL 3.9.3
LTR 3.34.14-Prizren GDAL 3.9.3

I am using OSGeo4W command line to install the packages.

"%OSGEO4W_ROOT%\bin\osgeo4w-setup.exe" -q -b -A -k -n -s http://download.osgeo.org/osgeo4w/v2 -P python3-geopandas -P python3-rasterio -P python3-fiona

python3-rasterio 1.3.10-1 is compatible with the above. Is there a switch for using the previous version when using the command line?

in reply to:  2 comment:3 by jef, 3 months ago

Replying to Christina Ratcliff:

python3-rasterio 1.3.10-1 is compatible with the above. Is there a switch for using the previous version when using the command line?

Correct. For the current python-rasterio you need the current gdal 3.10.1 (and current QGIS 3.40.3). For older version you can use the snapshots (/)

comment:4 by Christina Ratcliff, 3 months ago

Thanks, I didn't know that this was possible.

After some trial and error I found I had to delete the cached packages in temp, and add the --only-site get it to work with QGIS 3.40.2

setup -q -b -A -k -n -O -s https://download.osgeo.org/osgeo4w/v2/snapshots/20241225-024323/ -P python3-geopandas -P python3-rasterio -P python3-fiona

Now I'll add it to my plugin installation procedure.

in reply to:  4 comment:5 by jef, 3 months ago

Replying to Christina Ratcliff:

Thanks, I didn't know that this was possible.

After some trial and error I found I had to delete the cached packages in temp, and add the --only-site get it to work with QGIS 3.40.2

Included --only-site in the paragraph.

comment:6 by Christina Ratcliff, 2 months ago

Thanks for that. Another quick question relating to this.

On the snapshot page the later folders are

20220707-210719 Year Month Day - Hours Mins Secs

But what about the earlier ones ie 1707305603/ or should I be ignoring these.

comment:7 by jef, 2 months ago

No, those are also valid - but initially epoch was used

$ ls -l --time-style="+%F %T" 1707305603/x86_64/setup.ini
-rw-rw-r-- 1 www-data www-data 309578 2024-02-07 12:33:23 1707305603/x86_64/setup.ini
$ date --date @1707305603 "+%F %T"
2024-02-07 12:33:23
$ find . -lname 1707305603 -ls
   805255      1 lrwxrwxrwx   1 jef      users          10 Feb 13  2024 ./20240207-123323 -> 1707305603
Note: See TracTickets for help on using tickets.