1

I have ArcGIS Pro (2.3.x) installed on my PC. I have python scripts which call ArcGIS toolbox models and runs them. Everything works fine.

Today I installed GDAL and Python bindings for GDAL. I also followed installation instructions and created a new system variables for GDAL_DATA (C:\Program Files (x86)\GDAL\gdal-data) and GDAL_DRIVER_PATH (C:\Program Files (x86)\GDAL\gdalplugins). I also edited the PATH variable and added 'C:\Program Files (x86)\GDAL' as an environment variable. Gdal runs fine on cmd prompt.

However, when I went back to run my arcpy scripts, I had a load of errors like 'can't load requested DLL GDAL C:\Program Files (x86)\GDAL\gdalplugins\xxxx.dll is not a valid win32 application'. It seems like installing a separate GDAL install has pointed ArcGIS in the wrong direction for any GDAL related queries? I didn't even know ArcGIS used GDAL...

When I then uninstall GDAL, the ArcGIS scripts work fine.

Any advice to what has gone wrong here and what I should do to install an independent GDAL on my ArcGIS machine?

  • 1
    ArcGIS Pro is a 64-bit application. It is not compatible with a 32-bit GDAL. – Vince May 28 at 12:25
3

The easiest way I have found to have GDAL installed on the same machine as ArcGIS is to have a completely separate version of python installed.

On this completely separate version of python you should install numpy (pip install numpy) and then download the correct gdal .whl file from https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal

This can also be installed via pip.

The advantage of installing this .whl file means that you don't need to play around with the environment path as the wheel file comes with everything already bundled that will be needed to run gdal/ogr.

  • 1
    Thanks. My problem was definitely trying to access 32bit GDAL dlls with my 64bit ArcGIS models. I uninstalled 32bit- GDAL, GDAL python bindings, gdal wheel file, python 3.7. Then Installed 64bit- python 3.7, gdal, gdal python bindings, gdal wheel file. Everything seems to work ok now. – Theo F May 28 at 13:54
1

ArcGIS Pro 2.3 release includes a GDAL/OGR installation. Check all the community ideas that were included in that release here: https://community.esri.com/community/arcgis-ideas/blog/2019/01/17/ideas-in-arcgis-pro-23

  • I think this could become a highly upvoted answer if you used the video to find documentation on how to do this and include that in your answer instead. – PolyGeo May 28 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.