Thank Luke and Ivan,

Yes, pyinstaller is a good alternative but it didn't work for me either, resulting in a near-identical dll-load error to the one from py2exe. And it wasn't the gdal???.dll that was the problem; that one was properly included both by py2exe and pyinstaller.

The solution was instead to manually include the msvcp100.dll and msvcr100.dll that are part of the gdal-111-1600-core.msi and package them into the folder in which the compiled exe file is installed. Now it works!

Strangely I had tried before to put two dlls with this name into a folder that is already in the PATH, and I know that this didn't resolve the issue then. I wonder now whether the two files that are part of the gdal core installation are slightly different from other files with that same name that I found on my machine.

Anyway, it works now. Many thanks again for your comments.

Armin

On 15/08/2014 02:55, Luke wrote:
Can you post your setup.py? Hard to tell what's going on without it.

Also, I have had good results with pyinstaller, it picks up gdal
dependencies automatically and is as simple as running python pyinstaller.py
somescript.py (or python pyinstaller.py --onefile somescript.py if you want
a single output file instead of a folder).

https://github.com/pyinstaller/pyinstaller
https://pypi.python.org/pypi/PyInstaller/2.1

Luke



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/gdal-dev-Problems-packaging-with-py2exe-tp5156399p5156494.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev


--
__________________________________________________________________
Dr. Armin Schmidt
Director, GeodataWIZ Ltd:  Geo Data + Visualisation
 www.GeodataWIZ.com
 www.GeodataWIZ.com/armin-schmidt
Chairman, Internat. Society for Archaeological Prospection
 www.archprospection.org
Postdoctoral Researcher, University of Groningen
 Groningen Institute of Archaeology
Honorary Visiting Research Fellow, University of Bradford
 Department of Archaeological Sciences
Honorary Fellow, Durham University, Department of Archaeology
http://orcid.org/0000-0002-4241-5381

Email: [email protected]

Now available:
Earth Resistance for Archaeologists (2013). Lanham: AltaMira Press
Geophysical Data in Archaeology (2013). Oxford: Oxbow Books.
http://www.amazon.co.uk/-/e/B0034QC4OW
__________________________________________________________________
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to