Error with toolboxes in ArcGIS Pro 2.2

11471
24
Jump to solution
06-26-2018 05:28 PM
MarkTukman
New Contributor II

I just upgraded to ArcGIS Pro 2.2.  When I open a new project and click on the 'Analysis' tab on the ribbon, I get an error message 'Failed to load system tools with a path to:  c:\program files\arcgis\pro\Resources

\ArcToolbox\Toolboxes\Spatial Statistics Tools .pyt

And no system toolboxes are loading by default (analysis, etc.).  Anyone know the fix?

0 Kudos
24 Replies
HungTruong
New Contributor III

I check python packages, python-dateutil is already installed

Somehow untools cannot load dateutil module. Any ideas?

DrewFlater
Esri Regular Contributor

Mark Tukman‌ did you upgrade to Pro 2.2 from a previous version? Were you using customized Python environments? The PYTs can fail to initialize when there is a corrupt Python environment, which can also stop you from running ArcPy or other Python commands in the Python window. Can you try a simple arcpy command like arcpy.GetInstallInfo() in the Python window?

MalcolmWilliamson
New Contributor II

Drew, I have the same problem as the OP, which started under 2.1.x and has carried over to my 2.2 installation (I actually did an uninstall on 2.1.2 prior to installing 2.2). When I run arcpy.GetInstallInfo(), I get the following:

Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'arcpy' is not defined

I assume that there is a problem with a python installation on this computer, but I do not know how to fix it. I currently have Desktop 10.5 installed, along with lots of other software. The problem does seem to be tied to my Windows user account - a freshly created local user doesn't have the same problem. Thanks for any suggestions. 

0 Kudos
GhislainPrince
Esri Contributor

Hi Malcolm,

 that's the error you'd get if you forgot to import arcpy. Try this instead pls... 

1. windows start button , select "Python Interactive Terminal"

2. import arcpy

3. print(arcpy.GetInstallInfo())

MalcolmWilliamson
New Contributor II

Hi Ghislain,

Thanks for the correction, you've put me on track to a solution! Upon "import arcpy", it seems that it's referencing a stray python path with a problematic version of numpy:

>>> import arcpy
Traceback (most recent call last):
  File "C:\Users\malcolm\AppData\Roaming\Python\Python36\site-packages\numpy\core\__init__.py", line 16, in <module>
    from . import multiarray
ImportError: cannot import name 'multiarray'

(and more stuff)

I list the paths:

>>> import sys
>>> for p in sys.path:
...     print(p)
...

C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python36.zip
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\DLLs
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3
C:\Users\malcolm\AppData\Roaming\Python\Python36\site-packages
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages
C:\Program Files\ArcGIS\Pro\bin
C:\Program Files\ArcGIS\Pro\Resources\ArcPy
C:\Program Files\ArcGIS\Pro\Resources\ArcToolbox\Scripts
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\future-0.16.0-py3.6.egg
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pytz-2018.3-py3.6.egg
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\sympy-1.1.1-py3.6.egg

(Highlighted bad path in red)

So, I can fix the problem just by renaming or removing the rogue Python location. But I am curious how the ArcGIS Pro Python installation found that path in the first place. Is C:\Users\%USERNAME%\AppData\Roaming\Python a standard path that a new Python installation looks for, or was this stored somewhere?

Again, my ArcGIS Pro problem is cured once I've removed the problematic files - just curious how the ArcGIS Pro Python installation got crosswise with it. Thanks very much for your help!