This is confusing, and a question I've harvested from a duplicate, so let me start with my setup.
- OS: Windows 7 x64
- GIS Client 1: ArcGIS Desktop 10.5
- GIS Client 2: ArcGIS Pro 1.4
- GIS Client 3: Boundless Desktop 1.0 (QGIS 2.14)
Background
Many of the scripts I write, I try to keep open-source for those without a fancy ArcGIS license. However, I can't set PyQGIS as my default system interpreter in my environment variables because it will break many of the tools in ArcMap. So I have taken the approach of making ArcGIS's Python instance the system Python, and installing open-source libraries there (and using .pth files to pull in qgis.core functionality if I need it). I am using Gohlke's precompiled GDAL wheel (32-bit) in this case. I am operating under the assumption that this breaks the fewest amount of things.
Problem
I have multiple installs of GDAL, and the system seems to keep defaulting to one of them, ignoring any environment variables I set.
C:\Program Files\GDAL contains version 2.1.0 (64-bit).
C:\Python27\ArcGIS10.5\Lib\site-packages\osgeo contains version 2.1.3 (32-bit).
C:\Program Files\GDAL appears nowhere in my user environment variables.
Instead, I have the variables:
GDAL_DATA pointing to C:\Python27\ArcGIS10.5\Lib\site-packages\osgeo\data\gdal
and a variable called
GDAL_DRIVER_PATH pointing to C:\Python27\ArcGIS10.5\Lib\site-packages\osgeo.
C:\Python27\ArcGIS10.5\Lib\site-packages\osgeo is in my PATH.
Yet, when I open a command prompt and type ogrinfo --version it does not give me 2.1.3 (the version in PATH) but rather 2.1.0 (the 64-bit version in \Program Files\GDAL, which is nowhere in PATH).
What gives?
Answers that do not answer my question
How to force QGIS to use GDAL version?
Unable to call GDAL functionalities from Python
How to add support for FileGDB (Esri file gdb API) driver in fiona?
setinside the command line window. Apart from thePATHvalue, look also forPYTHONPATHandPYTHONHOME. If you use the OSGEO4W shell, kit sets its own environment variables. Not sure if Boundless does the same. – AndreJ May 23 '18 at 13:35