AnsweredAssumed Answered

geopandas with arcpy 10.7.1

Question asked by brian.avant_noaa on Feb 21, 2020
Latest reply on Jul 15, 2020 by jknowles@usbr.gov_USBR

I recently upgraded my ArcGIS Desktop from 10.6.1 to 10.7.1 and I am having trouble finding a virtual environment that supports both 10.7.1 and open source GIS python libraries. I have a conda environment that works for 10.6.1 and open source, but when I try this environment with 10.7.1 it will not import geopandas or rasterio. I did a little digging and it seems this may have something to do with the different gdal bindings for 10.6.1 and 10.7.1. I noticed that when I remove the DTBGGP64.pth from the conda env, the geopandas and rasterio libraries work (arcpy does not though obviously). Has anyone encountered this? I am including the 10.6.1 conda environment yml file that worked great before I upgraded to 10.7.1.

 

After trying the 10.6.1 conda environment as-is, I created a new environment using the 10.7.1 library versions (pip.operations.freeze.freeze()) and adding the open source GIS libraries through conda. I copied the DTBGGP64.pth to the site packages folder of the new env. The problem is exactly the same. Arcpy functions work fine, but rasertio and geopandas give import errors. When I remove the DTBGGP64.pth, rasterio and geopandas work fine.

 

Edit: these are the specific errors I am getting.

 

with DTBGGP64

>>> import arcpy
>>> import rasterio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\envs\arcpy_10_7\lib\site-packages\rasterio\__init__.py", line 15, in <module>
    from rasterio._base import (
ImportError: DLL load failed: The specified procedure could not be found.

 

without DTBGGP64

>>> import rasterio
>>> import geopandas
>>> import arcpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named arcpy

Attachments

Outcomes