Esri / Esri/arcpy

GDAL import dll error when creating a new environment from scratch

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
57
Forks
5
PR merge metrics
No merged PRs in 30d

Description

See also [this issue](https://github.com/Esri/arcgis-python-api/issues/2542) for way more details.

**Describe the bug**
When I create a new environment from scratch (not a clone!), I get a non-functioning gdal environment.

**To Reproduce**
Creating an environment using `conda create -n gdaltest36 -c esri python=3.13 gdal arcpy=3.6` gives a non-working gdal in the environment and `conda create -n gdaltest -c esri python=3.13 gdal=3.11.3 arcpy=3.6` gives a working gdal in the environment. It seems that the arcpy=3.6 cannot handle gdal=3.12.2 from esri.

When I execute `python -c "from osgeo import gdal; print(gdal.VersionInfo())"`
In the environment gdaltest36, I get an `ImportError`, in the environment gdaltest, I get the expected `3110322`

**Version (please complete the following information):**
- arcpy 3.6

**Additional context**
See the original issue.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two conda create commands from the issue, then run the provided Python import and VersionInfo checks in each environment. Read the linked issue for the additional details and compare the installed GDAL and arcpy versions; done means a fresh environment with arcpy 3.6 can import osgeo.gdal successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.