Python for ArcGIS 1.9.0 and ArcPy 2.8 incompatibility? (pandas)

09-06-2021 09:20 PM
New Contributor II


We have found that there may be an issue with the pandas install when using Python for ArcGIS 1.9.0 and ArcPy 2.8 together in a conda clone. Posting to see if it affects and/or helps others.

I am using Conda 4.10.0 and ArcGIS Pro 2.8.2 is installed on the machine.

Solution first:
The following works (update pandas):

conda create -c esri -n arcgis-pro --yes --offline python=3.7
conda install -c esri --yes --offline arcgis=1.9.0
conda install -c esri --yes --offline arcpy=2.8
conda install -c anaconda --yes --offline pandas=1.1.3

 Steps to reproduce breakage:
New clone, install Python for ArcGIS 1.9.0 (works ok at this time)

conda create -c esri -n arcgis-pro --yes --offline python=3.7
conda install -c esri --yes --offline arcgis=1.9.0
conda activate arcgis-pro python
>>> import arcgis
>>> exit()

Install ArcPy 2.8 (breaks Python for ArcGIS 1.9.0)

conda install -c esri --yes --offline arcpy=2.8
>>> import arcgis
>>> !!explosions!! (see error below)

If pandas is not upgraded/reinstalled after installing ArcPy 2.8, we received the following error when attempting to use Python for ArcGIS 1.9.0

(arcgis-pro) PS D:\> python
Python 3.7.10 (default, Feb 26 2021, 13:06:18) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import arcgis
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\arcgis\", line 4, in <module>
    from . import features, geoanalytics, geocoding, geometry
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\arcgis\features\", line 33, in <module>
    from . import enrich_data
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\arcgis\features\", line 10, in <module>
    import as network
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\arcgis\network\", line 7, in <module>
    from ._layer import (
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\arcgis\network\", line 10, in <module>
    from arcgis.mapping import MapImageLayer
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\arcgis\mapping\", line 8, in <module>
    from ._types import (
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\arcgis\mapping\", line 30, in <module>
    from arcgis.widgets._mapview._traitlets_extension import ObservableDict
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\arcgis\widgets\", line 2, in <module>
    from arcgis.widgets._mapview import MapView
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\arcgis\widgets\_mapview\", line 1, in <module>
    from arcgis.widgets._mapview._mapview import MapView
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\arcgis\widgets\_mapview\", line 38, in <module>
    import pandas as pd
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\pandas\", line 22, in <module>
    from pandas.compat import (
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\pandas\compat\", line 23, in <module>
    from pandas.compat.pyarrow import (
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\pandas\compat\", line 9, in <module>
    _palv = Version(_pa_version)
  File "C:\ProgramData\Anaconda3\envs\arcgis-pro27\lib\site-packages\pandas\util\version\", line 339, in __init__
    match =
TypeError: expected string or bytes-like object


6 Replies
MVP Esteemed Contributor

Did you check the github site for already reported issues?

Esri/arcgis-python-api: Documentation and samples for ArcGIS API for Python (

you might want to post an issue their if you didn't find and open or closed issue that matches yours.

... sort of retired...
0 Kudos
New Contributor II

I had a look but didn't find one, so raised it for visibility.

0 Kudos
Occasional Contributor

That's a big pick up, thank you, it  has saved me a heap of time, most of my scripts stopped working last night. I tried uninstalling pandas and reinstalling 1.1.3 with ArcGIS Pro, but it installed the latest version (even though i selected 1.1.3), so used pip install on the cloned environment.

0 Kudos
New Contributor II

No problem!

0 Kudos
by Anonymous User
Not applicable

Please checkout the discussion and resolution at

0 Kudos
New Contributor II

I found that there was a version of `pyarrow` that was faulty - it didn't return a version number as expected. As of ArcGIS Pro version 2.8, this version (1.0.1 build 1, via the esri channel) came standard with the `arcgispro-py3` environment. For whatever reason, this doesn't cause problems in the AGP GUI, but it can prevent pandas and other packages that depend on pandas from importing correctly.

The solution that worked well for me was to activate the affected environment and `conda update pyarrow`. In my environment (which began as a clone of `arcgispro-py3`), this resulted in my installing pyarrow version 1.0.1 build 2, which is seemingly identical to 1.0.1 build 1 except that it returns a version number when queried by other packages.

0 Kudos