Select to view content in your preferred language

Cloning ArcGIS Pro 2.8 default environment misses GDAL_DRIVER_PATH

2412
8
07-06-2021 01:59 AM
LewisTrotter
Occasional Contributor

Hello all,

I recently cloned the default ArcGIS Pro 2.8 Conda environment so I can install and use rasterio and dask for some big data analyses. I used the Python Command Prompt (PCP) that comes with ArcGIS to perform the clone instead of the in-software interface.

The clone worked fine, and rasterio and dask installed without issues. However, when I try to run any rasterio method that wraps GDAL I get an GDAL environment issue. I don't have any GDAL issues when using the default environment.

I activated the the cloned environment in the PCP to have a look, and get this warning:missing_gdal.png

Does anyone know how to make sure my cloned environment is directed to the correct GDAL path?

Many thanks!

 

Tags (4)
0 Kudos
8 Replies
DanPatterson
MVP Esteemed Contributor

gdal stuff is installed in

C:\...install_folder...\bin  and

C:\...install_folder...\bin\gdalplugins

and probably elsewhere, I doubt the cloning process copied all that over

ADDENDUM

as well (forgot osgeo)

C:\...install_folder...\bin\Python\envs\arcgispro-py3\Lib\site-packages\osgeo


... sort of retired...
LewisTrotter
Occasional Contributor

Thanks Dan,

Very helpful. Do you know how I can set my clone environment up to see these paths? I'm hoping I can just set them once instead of every time I activate.

0 Kudos
DanPatterson
MVP Esteemed Contributor

Can you confirm those paths exist in your clone path.  You shouldn't have to set the gdal path if the clone contains the equivalent files, you should just have to activate the clone and run within the clone


... sort of retired...
LewisTrotter
Occasional Contributor

I tried looking at environmental vars via: "conda env config vars list" in the PCP but I nothing was returned. Are there any other ways to check?

0 Kudos
DanPatterson
MVP Esteemed Contributor

windows file explorer... examine your clone for the paths that I cited earlier

or

activate your clone then

>>> conda list

 


... sort of retired...
LewisTrotter
Occasional Contributor

Thanks.

Yes, all of those paths are there. 

0 Kudos
Luke_Pinner
MVP Regular Contributor

Did you clone from the command line? The python package manager GUI in Pro won't create clones in C:\Program Files\etc... as far as I'm aware.

Did you install an updated/non-esri channel GDAL? 

In python, from osgeo import gdal; gdal.__version__ should return 2.33e which is an Esri customised gdal and automatically sets "GDAL_DRIVER_PATH" for you (in [env dir]/Lib/site-packages/osgeo/__init__.py).

LewisTrotter
Occasional Contributor

Thanks Luke!

I installed via the command line using:

conda create --clone arcgispro-py3 --name arcgispro-py3-dev-tool
activate arcgispro-py3-dev-tool

conda install dask
conda install rasterio

When I check gdal version I get  2.3.3e.

 

0 Kudos