Sunday, 6 March 2016

arcpy - Can ArcGIS and OSGeo4W share the same python install?



I don't like unnecessary duplication. Is it possible to install python only once and have both ArcGIS and OSGeo4W using it?



Answer



Update, 2017: This is now the best answer for co-existing ArcGIS + {other} python installs: Making separate Python installation that can call ArcPy?



...


Circa 2010, ArcGIS 9.x


This is how I did it for ArcGIS 9.3 and Osgeo4W with pythons 2.5 through 2.7:



  1. Uninstall existing arcgis python (or remove registery entries).

  2. Open an o4w command shell and run register-python.py

  3. Install pywin32 for corresponding python (*win32-py2.5.exe at the moment)

  4. Grab the arcgisscripting.py script written by Philippe Le Grand (taken from this thread in the ESRI scripting forum) and plop it into C:\Python2.5\Lib\site-packages


You might need to add C:\path\to\ArcGIS\bin to PYTHONPATH, depending on what arc python modules you use.



(source)


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...