3

We noticed an office-wide installation of Python 2.7.15 this morning at 5:30am.

The installation pushed Python 2.7.15 into a standalone folder on the C:/ drive of all our PCs. If there are two instances of Python on the machine, ArcGIS Desktop cannot recognize which Python instance to use, thus dropping functionality with the ArcPy module.

This is easily tested by launching the arcpy window in ArcMap and typing in import arcpy. The application crashes...

I assumed it was an auto-install setting in ArcGIS, but then we would expect the install to occur within the ArcGIS installation folder/directory and not a standalone install outside of programfiles.

Has anyone else experienced this?

We are on a campus that has fairly strict firewalls and the IT department was unaware of the automatic install.

This seems like a bug that could be reported but wanted to reach out to this community first.

3
  • 1
    (Esri employee here) Esri is (in)famously behind-the-times when it comes to updating python versions. Desktop doesn't do automatic updates AFAIK. ArcGIS Pro is more proactive at informing you there's an update, but I wouldn't expect it to update python automatically either.
    – mkennedy
    May 2 '18 at 17:48
  • 1
    (previous esri GP team member here) I'll second @mkennedy : Zero chance that ArcGIS (10.x) went out and updated Python on its own.
    – KHibma
    May 2 '18 at 17:57
  • Interesting... It seems odd that it occurred on multiple machines at the same time yesterday. I've reached out to our IT department and they couldn't find anything that would have automated the update/install. If it's not done through ArcGIS for Desktop than I'm not sure where else to look.
    – LMHall
    May 3 '18 at 14:16
2

@mkennedy and @KHibma are correct in that this likely didn't stem from any Esri automatic update. Finding the source of the install is very important, because if it recurs any fix you perform will have to be done again.

Your experience with testing an arcpy import in the console means that the new installation of Python (with the different path) is set as the default for each system. You could change the environment variables, but you'll likely encounter a bunch of other issues in processing due to the fact that Windows Registry values have been changed. I've had this issue on an enterprise ArcDesktop install before, and the easy way around it was to back up the old C:\Python27\ArcGIS10.x folder, delete that and the newly installed folder entirely, and run the Repair option from the ArcGIS Desktop Setup tool:

enter image description here

This will replace the Python directory/installation, and more importantly correct any winreg issues that might exist. Afterwards, you can replace the Python27 folder that it creates with your backed up version.

1
  • This is the obvious solution, though undesirable... We're aware of the repair process but I'm more curious to why this happened in the first place. I do appreciate you offering this solution and screenshots for other users that may end up here for help!
    – LMHall
    May 3 '18 at 14:14
0

I have never heard of this happening with ArcGIS Desktop, however, you can pretty easily fix this by adding the arcpy and bin folders in the arcgis install directory to the PYTHONPATH environment variable (your choice to go system or user). Arcpy should work again.

1
  • Thanks for the comment! Though, this isn't exactly desirable if you have ArcGIS Desktop and Pro installed since they use different versions of Python. Typically modifying the HKLM\software environments is not the best solution for remedying issues like these.
    – LMHall
    May 3 '18 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.