Select to view content in your preferred language

arcgis python package dependencies incompatible in Arc Pro 3.1.3 python base environment

960
4
01-22-2024 05:37 PM
VersaceGrace
Emerging Contributor

Hi,

My workplace upgraded to Arc Pro 3.1.3 recently. I tried importing arcgis in a python toolbox in the new python base env that comes with that but get errors. The import used to work in Arc Pro 2.9 base python env. 

The new errors relate to the versions of pandas and dask in the new python base env being incompatible.

It seems the arcgis package tries to import dask, which in turn tries to import pandas but the versions are incompatible so you get this error

import arcgis

AttributeError:module 'pandas.core.strings' has no attribute 'String Methods'

 

This can be resolved by the solution here: https://stackoverflow.com/questions/76322899/attributeerror-module-pandas-core-strings-has-no-attrib...

pip install --upgrade pandas "dask[complete]"

Is there a way that the pandas and dask packages in the arc python base env can be made compatible without the user having to fix it- this makes it difficult to deploy arc toolboxes to our organisation. Thank you

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

Did the environment show a mismatch? Which, unfortunately, would require you to check in the first place, rather than getting  a warning if there are multiple environments

Upgrade an environment—ArcGIS Pro | Documentation

Update packages—ArcGIS Pro | Documentation


... sort of retired...
0 Kudos
VersaceGrace
Emerging Contributor

Hi,

I got a long traceback of package import errors that finish with the listed pandas error. Updating pandas/dask fixed it.

 

I just wanted to make esri aware because the user would expect the arcgis package to be compatible with the default base env shipped with arc pro and it currently is not- esri should fix that in the next release.

0 Kudos
DanPatterson
MVP Esteemed Contributor

You would have to file a Tech Support issue to ensure that it is brought to esri staff.  They don't routinely monitor Community for issues


... sort of retired...
VersaceGrace
Emerging Contributor

Thank you for your suggestion though, but I will have to make a script to custom update the base envs for staff. My tool is meant to be used across the organisation and I can't rely on individual staff being able to update envs and packages themselves when they have limited python knowledge and only use arc pro in specific contexts.

0 Kudos