Conda keeps trying to downgrade arcpy 2.9 and dependencies to 2.8 version?

1294
3
Jump to solution
12-20-2021 09:34 AM
Labels (1)
Joshua-Young
Occasional Contributor III

After doing a new install of ArcGIS Pro 2.9 I cloned the default Python environment and ran conda update --all. I get the following warning:

The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

- esri/win-64::arcgis==1.9.1=py37_2327
- esri/win-64::arcpy==2.9=py37_arcgispro_32704
- esri/win-64::cftime==1.5.0=py37_1
- esri/win-64::gdal==3.3.0=arcgispro_py37_16778
- esri/win-64::h5py==2.10.0=py37_arcgispro_12
- esri/noarch::lerc==2.2=py_0
- esri/win-64::matplotlib==3.4.2=py37_arcgispro_1
- defaults/win-64::mkl-service==2.3.0=py37h196d8e1_0
- defaults/win-64::mkl_fft==1.3.0=py37h46781fe_0
- esri/win-64::mkl_random==1.2.0=py37_0
- esri/win-64::netcdf4==1.5.7=py37_arcgispro_2
- defaults/win-64::numexpr==2.7.3=py37hcbcaa1e_0
- esri/win-64::numpy==1.20.1=py37_0
- defaults/win-64::pandas==1.2.3=py37hf11a4ad_0
- esri/noarch::saspy==3.7.3=py_0
- defaults/win-64::scipy==1.6.2=py37h14eb087_0
- esri/win-64::swat==1.9.3=py37_0
- defaults/noarch::xarray==0.17.0=pyhd3eb1b0_0

I figured out that it is esri/win-64::arcpy==2.9=py37_arcgispro_32704 that is causing the issue. Conda keeps trying to downgrade the following:

The following packages will be DOWNGRADED:

appdirs 1.4.4-py_0 --> 1.4.4-pyhd3eb1b0_0
arcgispro 2.9-0 --> 2.8-0
arcpy 2.9-py37_arcgispro_32704 --> 2.8-py37_arcgispro_29734
gdal 3.3.0-arcgispro_py37_16778 --> 2.3.3-arcgispro_py37_16747
h5py 2.10.0-py37_arcgispro_12 --> 2.10.0-py37_arcgispro_10
html5lib 1.1-py_0 --> 1.1-pyhd3eb1b0_0
jdcal 1.4.1-py_0 --> 1.4.1-pyhd3eb1b0_0
jsonschema 3.2.0-py_2 --> 3.2.0-pyhd3eb1b0_2
netcdf4 1.5.7-py37_arcgispro_2 --> 1.5.4-py37_arcgispro_6
pro_notebook_inte~ 2.9-py37_9 --> 2.8-py37_0
protobuf 3.13.0.1-py37ha925a31_1 --> 3.6.1-py37h33f27b4_0
requests-toolbelt 0.9.1-py_0 --> 0.9.1-pyhd3eb1b0_0
traitlets 4.3.3-py37_0 --> 4.3.3-py37haa95532_0
wcwidth 0.2.5-py_0 --> 0.2.5-pyhd3eb1b0_0
zlib 1.2.11-h62dcd97_4 --> 1.2.11-h8cc25b3_4

I have been able to duplicate this on every computer we have put ArcGIS Pro 2.9 on. Is this a bug in the arcpy Python library? It is also keeping pandas locked at version 1.2.4 for some reason. I was using the latest version of pandas with arcpy 2.8.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

pandas 1.3.4 py37h6214cd6_0 is what I have in my base environment.

I don't "upgrade".  I did a complete removal of 2.8 and then installed pro 2.9

 

don't do an update all, these are pinned

arcgis 1.9.1.*
arcgispro 2.9.*
arcpy 2.9.*
freetype 2.10.*
gdal 3.3.0 arcgispro_py37_16778
h5py 2.10.*
matplotlib 3.4.2*
mkl 2020.0 arcgispro_167
nbconvert 5.6.*
netcdf4 1.5.7*
notebook 5.7.*
numpy 1.20.*
protobuf 3.13.0.1*
pro_notebook_integration 2.9.*
python 3.7.*
xlrd 1.2.*

If you want to upgrade pandas try --no-pin

It wants to remove/install a bunch of packages so assess what impact it may have on your clone.

>conda update pandas --dry-run

or

>conda update pandas --no-pin --dry-run

numpy, in particular, will cause you issues, which will affect pandas etc.

 

As a final test (in your clone), let it downgrade to 2.8, then update arcpy to 2.9 (it has been suggested by others and seems to have worked for them)


... sort of retired...

View solution in original post

3 Replies
DanPatterson
MVP Esteemed Contributor

pandas 1.3.4 py37h6214cd6_0 is what I have in my base environment.

I don't "upgrade".  I did a complete removal of 2.8 and then installed pro 2.9

 

don't do an update all, these are pinned

arcgis 1.9.1.*
arcgispro 2.9.*
arcpy 2.9.*
freetype 2.10.*
gdal 3.3.0 arcgispro_py37_16778
h5py 2.10.*
matplotlib 3.4.2*
mkl 2020.0 arcgispro_167
nbconvert 5.6.*
netcdf4 1.5.7*
notebook 5.7.*
numpy 1.20.*
protobuf 3.13.0.1*
pro_notebook_integration 2.9.*
python 3.7.*
xlrd 1.2.*

If you want to upgrade pandas try --no-pin

It wants to remove/install a bunch of packages so assess what impact it may have on your clone.

>conda update pandas --dry-run

or

>conda update pandas --no-pin --dry-run

numpy, in particular, will cause you issues, which will affect pandas etc.

 

As a final test (in your clone), let it downgrade to 2.8, then update arcpy to 2.9 (it has been suggested by others and seems to have worked for them)


... sort of retired...
Joshua-Young
Occasional Contributor III

@DanPattersonthank you for the suggestions. The last suggestion worked best for me. I cloned a new Python environment, let it downgrade arcpy to 2.8 when I ran the update --all command, and then forced an install of arcpy 2.9. The odd thing was I ran the update command on arcpy 2.8 and conda said it was up-to-date. Either way, my other Python libraries are up-to-date and arcpy is back at 2.9, so again thank you for the tips. I still get the inconsistent packages warning when I install new packages but everything seems to be working for now.

0 Kudos
DanPatterson
MVP Esteemed Contributor

Hopefully things will improve when python moves to 3.8/9/10, being stuck at 3.7 is beginning to cause issues for me because numpy's newest version dumped 3.7 and other packages are beginning to bark as well, but arcpy/numpy are linked and something is holding python upgrades back.  Maybe arcpy 3.0


... sort of retired...
0 Kudos