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:
Does anyone know how to make sure my cloned environment is directed to the correct GDAL path?
Many thanks!
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
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.
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
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?
windows file explorer... examine your clone for the paths that I cited earlier
or
activate your clone then
>>> conda list
Thanks.
Yes, all of those paths are there.
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).
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.