Configuring Aptana for use with Arcpy

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.

  1. 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.
  2. 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).
  3. 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.

    Python Interpreters (click for larger image)

    Aptana Preferences: python interpreters (click for larger image)

  4. 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).
  5. 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).
    Include paths for python (click for larger image)

    Include paths for python systempaths (click for larger image)

    Click OK. Aptana will now scan all paths for relevant libraries.

  6. 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.


2 thoughts on “Configuring Aptana for use with Arcpy

  1. Pingback: Configuring Aptana for use with Arcpy |

  2. Pingback: Creating a simple 3D model of the underground with CityEngine | ahgvn

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s