[gdal-dev] Question: build gdal2tiles.py as exe

К gigas002 at yandex.ru
Wed Nov 7 13:05:53 PST 2018


Hello! 
I'm trying to bulild gdal2tiles.py as standalone executable by using PyInstaller to use it as process from c# code (because gdal2tiles is'nt exist in bindings).
I tried with both Python 3.7.1 and Python 2.7.15, but the output binary is unable to run or lacks some functionality. For Python3 it runs OK, but throws an exception if i try to use "--processes" parameter.  For Python2 it can't run and says, that it's unable to find 'osgeo' package.
In both cases I used the following command line: pyinstaller D:\gdal\bin\gdal\python\scripts\gdal2tiles.py -D -p "D:\gdal\bin"
To build this version I used Gdal 2.3.2 stable daily release from GisInternals, build with x64 binaries and python on win10 x64.
It'd be great if you would advice me, how to build it as executable or a better way to use gdal2tiles in c# code (with no need to install python on target computer).
Thanks in advance for your reply!


More information about the gdal-dev mailing list