Installing OPUS/UrbanSim with ArcGIS
It is highly recommended that any version of Python that was installed with ArcGIS be uninstalled prior to installing OPUS. If you do not, ArcGIS and OPUS will still function properly, but there could be confusion in the future with 2 versions of Python installed. If you uninstall an older version of Python prior to installing OPUS, you will be left with a single version of Python (2.5.1) that works with both OPUS and ArcGIS (9.x versions). If you choose to leave the version of Python installed with ArcGIS on the PC, the following notes should help you resolve possible future issues.
Scenario 1: ArcGIS 9.0 / 9.1 with Python 2.1 is already installed
- It is recommended to uninstall Python 2.1 and Pythonwin prior to installing OPUS, but if you choose not to, please read the following:
- When OPUS/UrbanSim is installed:
- ArcGIS scripting should work fine at this point with no modifications needed.
- OPUS and ArcGIS are both using Python 2.5.1.
- Uninstalling Python 2.1 and Pythonwin:
- This is NOT recommended.
- At this point I have been unable to get ArcGIS python scripting to work with Python 2.5.1 properly again.
Scenario 2: ArcGIS 9.2 with Python 2.4.1 is already installed
- It is recommended to uninstall Python 2.4.1 prior to installing OPUS, but if you choose not to, please read the following:
- When OPUS/UrbanSim is installed:
- ArcGIS scripting should work fine at this point with no modifications needed.
- OPUS and ArcGIS are both using Python 2.5.1.
- Uninstalling Python 2.4.1 (OPTIONAL): If you decided to follow option 2 above, ArcGIS will be using Python 2.5.1 for its scripting. If you decide to uninstall Python 2.4.1, it will remove ALL Python file associations from the system, causing ArcGIS (and possibly OPUS) to not function correctly. To solve this, at a minimum you will need to associate .py files with the 2.5.1 version of python.exe. This should take care of the problem.
- Note: In order for ArcGIS 9.2 and Python 2.5.1 work nicely together, it was necessary to copy a script called arcgisscripting.py to your Python site-packages directory and require that the win32all extensions be installed. At ArcGIS 9.2, ESRI included a native python package that was compiled against Python 2.4.1. This allowed the 'import arcgisscripting' syntax, plus it negated the need for the win32all extensions for Python to be installed. The arcgisscripting.py script enables the 'import arcgisscripting' syntax that all scripts shipped with ArcGIS use. It does this via the older win32all extensions method. Thanks to Philippe Le Grand on the ESRI support forums for providing this script under the GNU license.
Scenario 3: ArcGIS will be installed after OPUS/UrbanSim
- In this case, you must be careful upon installing ArcGIS to NOT install Python along with it.
- To do this, choose the 'custom' install option when installing ArcGIS, then deselect Python in the list of components to install.
- Since OPUS has already been installed, the appropriate file associations, packages, and modules are already in place for ArcGIS Python scripting to function properly.
