I recently updated to 3.1.7 and started running into this error whenever I try to import packages that are dependent on numpy:
Since the error suggests something is going on with my numpy install, I started looking at some of the package installations in my ArcPro environment and it looks like my numpy installation is incompatible with my scipy installation:
First off, I am confused because my numpy install appears to be below 2.0 but the error says that the module is being run on 2.0.2. I tried to upgrade my numpy package in a cloned environment via "conda install numpy=1.23.5", but the install fails because my requested specs conflict with pinned specs:
SpecsConfigurationConflictError: Requested specs conflict with configured specs.
requested specs:
- esri/win-64::arcpy-base==3.1=py39_41833
- esri/win-64::arcpy==3.1=py39_arcgispro_41833
- esri/win-64::cryptography==43.0.1=py39_0
- esri/win-64::numexpr==2.8.1=py39_0
- esri/win-64::scipy==1.6.2=py39_0
- numpy=1.23.5
pinned specs:
- mkl==2020.0=arcgispro_167
Use 'conda config --show-sources' to look for 'pinned_specs' and 'track_features'
configuration parameters. Pinned specs may also be defined in the file
\\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone-1\conda-meta\pinned.
When I look at the codna-meta pinned specs it's got numpy 1.20.*
I also asked my co-worker about his environment and he has the same numpy and scipy versions but, scipy lists the numpy dependency as numpy>=1.19,<1.26.0.
Why does the same scipy version have different numpy dependencies? And how I can I resolve this dependency conflict if scipy lists a numpy dependency version that is incompatible with my pinned specs?
Solved! Go to Solution.
Pro 3.4 and above uses python 3.11 and numpy version '1.24.3'
Pro 3.3 uses a lower version of numpy (if menory serves 1.21
Prior versions would require you to go to
ArcGIS Pro 3.4 system requirements—ArcGIS Pro | Documentation and on the 2nd line, change to the supported version and check install versions.
Don't install/update anything in your Pro's arcgispro-py3 environment, use a clone.
If you changed anything or installed anything in the base environment, I would recommend a reinstall,
Better still, do a clean uninstall and upgrade to Pro 3.4 if you possibly can.
If you want to use anything else that doesn't require arcpy, then create your own conda environment and use it (eg python 3.12 and numpy > 2)
Pro 3.4 and above uses python 3.11 and numpy version '1.24.3'
Pro 3.3 uses a lower version of numpy (if menory serves 1.21
Prior versions would require you to go to
ArcGIS Pro 3.4 system requirements—ArcGIS Pro | Documentation and on the 2nd line, change to the supported version and check install versions.
Don't install/update anything in your Pro's arcgispro-py3 environment, use a clone.
If you changed anything or installed anything in the base environment, I would recommend a reinstall,
Better still, do a clean uninstall and upgrade to Pro 3.4 if you possibly can.
If you want to use anything else that doesn't require arcpy, then create your own conda environment and use it (eg python 3.12 and numpy > 2)
Thanks for the tip! I did uninstall and re-install 3.1.7 (My organization still uses some custom tools that haven't been upgraded for 3.4 quite yet). I was still running into the same error, so then I uninstalled again and went through and manually deleted all the my conda folders from C:\Program Files\ArcGIS and C:\Users\<user>\AppData\Local since those didn't get removed by the install. After re-starting and re-installing, the issue is resolved! I think this was caused by trying to install geopandas on my default environment instead of cloning the environment and installing geopandas on the clone. Lesson learned!