Opened 4 months ago

Closed 6 weeks ago

#656 closed defect (fixed)

Missing DLL when importing Fiona, Geopandas or rasterio within QGIS

Reported by: cratcliff Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords: fiona geopanda rasterio
Cc:

Description

Hi,

Since the release of QGIS 3.16.2-Hannover or 3.10.13-A Coruña on Windows 10 I have been getting errors (see below) when trying to import fiona, geopandas and rasterio.

I have installed fiona, geopandas and rasterio using the OSGeo4w.

How do I go about fixing this issue for this release while not breaking older releases?

Is there a way to configure these packages to work with QGIS without having to request a rebuild/fix every time a new version of QGIS is released?

Thanks in Advance. Christina

import geopandas
Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python\qgis\utils.py", line 792, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\geopandas\__init__.py", line 5, in <module>
    from geopandas.io.file import read_file  # noqa
  File "C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python\qgis\utils.py", line 792, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\geopandas\io\file.py", line 6, in <module>
    import fiona
  File "C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python\qgis\utils.py", line 792, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\fiona\__init__.py", line 84, in <module>
    from fiona.collection import BytesCollection, Collection
  File "C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python\qgis\utils.py", line 792, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\fiona\collection.py", line 9, in <module>
    from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
  File "C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python\qgis\utils.py", line 792, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: DLL load failed: The specified module could not be found.
import rasterio
Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python\qgis\utils.py", line 792, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\site-packages\rasterio\__init__.py", line 22, in <module>
    from rasterio._base import gdal_version
  File "C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python\qgis\utils.py", line 792, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: DLL load failed: The specified module could not be found.

Change History (2)

comment:1 Changed 4 months ago by andreaerdna

Hi Christina, this is probably due to a missing gdal300dll an proj62dll packages. I think you could solve the issue installing both packages via OSGeo4W Setup.

Last edited 4 months ago by andreaerdna (previous) (diff)

comment:2 Changed 6 weeks ago by jef

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.