I have got a lot troubles with GDAL and OGR in the context of ArcGIS Server on 64 bit server machine. I can run script that use GDAL in ArcGIS as Tool and in the debug mode in PyScripter, then publish script as GP Service. I know that ArcGIS for Dekstop use 32 bit version of Python, and Server use 64 bit. I can see both version in Python27 folder. So in the desktop mode (32 bit) everything is Ok. But when I use submit job by REST I get an ERROR
esriJobMessageTypeError: Traceback (most recent call last): File "C:\arcgisserver\directories\arcgissystem\arcgisinput\project\Analize.GPServer\extracted\v101\Analize.py", line 14, in from osgeo import gdal File "C:\Python27\ArcGISx6410.1\lib\site-packages\osgeo__init__.py", line 21, in _gdal = swig_import_helper() File "C:\Python27\ArcGISx6410.1\lib\site-packages\osgeo__init__.py", line 17, in swig_import_helper _mod = imp.load_module('_gdal', fp, pathname, description) ImportError: DLL load failed: Nie można odnaleźć określonego modułu.
I know that the reason is GDAL library. How to configure environment on ArcGIS Server machine to force to use 32 bit GDAL in the case of ArcGIS for Desktop and 64 bit for ArcGIS Server?
I installed: GDAL for Desktop 32 bit according this solution How to run OGR in ArcGIS Scripts? GDAL for ArcGIS 64 bit the same packages but for 64 bit
When I change PATH to new GDAL 64 bit script in ArcGIS and Service does not work
If PATH is set to GDAL 32 bit script works, but I still get error by REST. It seems that ArcGIS Server does not see the GDAL library on the server machine.