takluyver / pynsist

Build Windows installers for Python applications
https://pynsist.readthedocs.io/
Other
896 stars 119 forks source link

Issues when using geopandas #196

Closed gduthe closed 3 years ago

gduthe commented 4 years ago

Hi, I am having trouble creating a workable executable for my application which uses geopandas. This package relies on fiona and gdal. I keep on getting the following error when launching the exe:

 File "pkgs\geopandas\__init__.py", line 5, in <module> from geopandas.io.file import read_file  # noqa
  File "pkgs\geopandas\io\file.py", line 6, in <module>  import fiona
  File "pkgs\fiona\__init__.py", line 83, in <module>  from fiona.collection import BytesCollection, Collection
  File "pkgs\fiona\collection.py", line 9, in <module>  from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: DLL load failed: The specified module could not be found.

I have tried using the downloaded wheels, for fiona and gdal, but this does not help. Any ideas?

takluyver commented 4 years ago

I don't know the details for this specific case, but usually that error message means that a compiled Python extension (.pyd) depends on another DLL which it isn't finding. There's a program called dependency walker which you can use to try to figure out what's missing, but it's not a straightforward process, and it doesn't tell you where to get the missing piece or how to package it.

takluyver commented 3 years ago

I've added a FAQ entry about this kind of error. Unfortunately there's still no shortcut to solve it, but hopefully having a decent explanation to point to is better than me doing a short version of it each time an issue comes up.

https://pynsist.readthedocs.io/en/latest/faq.html#dll-load-failed-errors