How to work with GDAL on ArcGIS Server machine with ArcGIS for Desktop?

Discussion created by lukasz.blaszczyk on Oct 23, 2013
ArcGIS Desktop 10.1 works with Python27 32 bit and with GDAL 32 bit and Python bindings. I created script that works in the PyScirpter and in ArcGIS for Desktop.  But in that case my script by default read systems variables and uses GDAL 32 bit. When I published the GP Service from the script, run it by REST I get this error:

Traceback (most recent call last): File "C:\arcgisserver\directories\arcgissystem\arcgisinput\Analyst\Analize.GPServer\extracted\v101\analize\", line 14, in from osgeo import gdal File "C:\Python27\ArcGISx6410.1\lib\site-packages\osgeo\", line 21, in _gdal = swig_import_helper() File "C:\Python27\ArcGISx6410.1\lib\site-packages\osgeo\", 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 installed both versions of GDAL (32 i 64 bit) with Python bindings.

How to conifgure ArcGIS for Server 10.1 to work with proper version of GDAL?