Aptana is a very good tool to write your Python scripts in. And since ArcGIS is equiped with loads of opportunities to use Python, Aptana is a good choice for developing your Arcpy (= ArcGIS’ site package for Python) scripts. Enabling Arcpy within Aptana is not very complicated, but you need to set a few configurations right. And if you forget this, it can be quite time consuming to find the solution.
So: a few pointers.
- I assume you already installed ArcGIS Desktop or Server. It comes with a dedicated Python interpreter, usually located in c:\Python26, where 26 is your version of Python.
- Download Aptana Studio 3 (I use the standalone version). Click through the setup (it will set itself up in C:\Users\username\AppData\Local\Aptana Studio 3 by default).
- After the installation has finished, go to Window -> Preferences. In the tree on the left, flip open PyDev and click on “Interpretor – Python”. You should see something like the screenshot below.
- Choose “New…” and provide a name for the new interpreter (e.g. “ArcGIS Python”). Also specify the path to python.exe (usually C:\Python26\ArcGIS10.0\python.exe).
- In the next window, the system paths must be specified. Be sure to include the paths beginning with C:\Program Files (x86)\ArcGIS (see screenshot below).
Click OK. Aptana will now scan all paths for relevant libraries.
- Click “Apply” in the preferences window and you’re set to go.
You can test if this works, by creating a new python script and starting it with “import arcpy”. If Aptana doesn’t give an error, then you’re fine. (Mark you: it might give a warning that the package is not used, but that’s okay).
Drop me a line if you have any questions.