After reading this ESRI blog post, I decided to give this a try with ArcGIS 10. I love playing with Linux, and I’m pretty good with Python, so this seemed like a fun experiment.
I set up a VirtualBox VM with Fedora 13 (32-bit). Next, I installed Eclipse. The Fedora version of Eclipse installs PyDev for you, so a separate install of that is not required. Should you want to update PyDev, inside Eclipse go to Help->Install New Software. Click the Add button to add a site. The location is: http://pydev.org/updates. Eclipse includes PyDev 1.5.5, and the updates list 1.6.0 as being available. I have not tried the upgrade yet, so do this at your own risk!
Next comes the ArcGIS Engine installation. Pretty straight-forward. Mount the CDROM (or ISO, or however you want). You must install the EngineRT first, then the ArcObjectsSDKJava. If you try to install the ArcObjectsSDKJava first, it will give you an error message about the Runtime, and bail.
To install the Engine Runtime:
$>cd /media/ESRI/linux/EngineRT
$> ./Setup
Walk thru the wizard, which is very simple. I installed the Single User setup. I got a warning about my system being “not supported”, but we knew that already.
To install the ArcObjectsSDKJava:
$>cd /media/ESRI/linux/ArcObjectsSDKJava
$> ./Setup
At the end of the ArcObjectsSDKJava, you will be asked if you want to Register your software.
Select the checkbox, and select Done. You will then walk thru the Authorization wizard, which appears to be running on Wine (it has an XP interface!)
Make sure you authorize both Engine Runtime and Engine Developer Kit. You should get your successful confirmation at the end of the process. You can confirm your license with the Administrator window.
To finish part 1 of this post, we are going to use a terminal to verify that everything is installed correctly. Start a terminal by going to Applications->System Tools->Terminal.
In your terminal, we will source the “init_engine.sh” (assuming you use Bash).
$>source ~/arcgis/engine10.0/init_engine.sh
$>
You should not see any error messages. Now, start a python session:
$> python
Python 2.6.5 (r265:79063, Apr 27 2010, 11:08:55)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import arcpy
>>> print arcpy.ProductInfo()
EngineGeoDB
>>>
Success! We can also list the tools available:
>>> import arcpy
>>> tools = arcpy.ListTools("*_management")
>>> for tool in tools:
... print tool
...
You should see a list of tools in the _MANAGEMENT toolbox.
There is some definite quirkiness going on, and I haven’t had time to research much of it. But if you try this:
>>> print arcpy.Usage(tool)
unicode(string [, encoding[, errors]]) -> objectCreate a new Unicode object from the given encoded string.
encoding defaults to the current default string encoding.
errors can be 'strict', 'replace' or 'ignore' and defaults to 'strict'.
However, you can do this:
>>> print arcpy.Usage(tool.encode('utf-8'))
SynchronizeMosaicDataset_management(in_mosaic_dataset, {where_clause}, {NO_NEW_ITEMS | UPDATE_WITH_NEW_ITEMS}, {SYNC_STALE | SYNC_ALL}, {UPDATE_CELL_SIZES | NO_CELL_SIZES}, {UPDATE_BOUNDARY | NO_BOUNDARY}, {NO_OVERVIEWS | UPDATE_OVERVIEWS}, {NO_PYRAMIDS | BUILD_PYRAMIDS}, {NO_STATISTICS | CALCULATE_STATISTICS}, {NO_THUMBNAILS | BUILD_THUMBNAILS})
Synchronize selected rasters in the mosaic dataset
If you get some error messages, leave me a comment and I’ll try to answer (I got a ton of errors before I had success).
In Part 2 (soon to follow), I will document how to configure Eclipse and PyDev to work with ArcPy.
