Problem:  After removing ArcGIS for Server or Background Processing (64-bit), Python files (.py) are not associated with Python

相关信息
Article ID: 41185
Bug Id: N/A
Software:
ArcGIS for Desktop Advanced 10.1, 10.2
ArcGIS for Desktop Standard 10.1, 10.2
ArcGIS for Desktop Basic 10.1, 10.2
ArcGIS for Server 10.1, 10.2
Platforms:
Windows Server 2008, Windows 7, Windows 8, Server 2012, Server 2008 R2

问题描述
The 10.1 release of ArcGIS for Server installs a 64-bit version of Python. At 10.1, Service Pack 1, Background Geoprocessing 64-bit was released, which also installs a 64-bit version of Python.

When either of these products are installed on the same machine as ArcGIS for Desktop, as the last product installed, the Windows file association for Python files (.py) is updated to the 64-bit version of Python.

原因
Removing the 64-bit ArcGIS product also removes 64-bit Python. When Python is removed, the file associations for .py files are removed.
已邀请:

易智瑞技术支持

赞同来自:

解决方案
The Windows file associations for 32-bit Python can be repaired in one of two ways.


Method 1: Perform a repair on ArcGIS for Desktop A. From the Programs and Features option in the Windows Control Panel, select ArcGIS for Desktop and click Uninstall/Change. B. Choose the Repair option and continue through the setup wizard.
Method 2: File associations can be manually set within Windows • Windows XP: Follow the instructions from Microsoft Knowledge Base article 307859: How to change or select which program starts when you double-click a file in Windows XP • Windows 7: Follow the instructions from the following Microsoft video: Change which programs Windows uses by default
A typical installation of ArcGIS for Desktop installs 32-bit Python to C:\Python27\ArcGIS10.1\python.exe. Use this Python executable when re-setting the file association.



其它相关参考
  1. FAQ: Why do Python scripts fail on a machine with both ArcGIS for Server and Desktop installed
  2. What is 64-bit Background Geoprocessing


创建及修改时间
Created: 5/17/2013

Last Modified: 8/6/2013
原文链接
http://support.esri.com/en/kno ... 41185

要回复问题请先登录注册