Eclipse Setup Instructions

Table of Contents

Prerequisites

These instructions assume you have already installed:

Trusted Analytics Platform should work with any version of Eclipse, but these instructions were tested with Eclipse Standard Version 4.4 Luna.

If you are on a corporate network, you may need to configure proxy settings in Eclipse before beginning (see Eclipse Help ).

Setup

  1. Download, install, and start the Eclipse IDE.

  2. Choose Help ‣ Eclipse Marketplace.

    R_images/ds_eclipse_01.png

    If the marketplace screen does not come up, you may need to configure proxy settings (see Eclipse Help ).

  3. Search for “PyDev” and choose PyDev - Python IDE for Eclipse 3.6.0 or newer version.

    1. Choose Confirm button.
    2. Choose Accept when prompted for license agreement.
    3. If prompted “Do you trust these certificates?”. Select “Brainwy Software; PyDev; Brainwy” and choose the OK button.
    4. When prompted to restart Eclipse, choose the Yes button.
  4. Choose the default Workspace.

  5. Choose File ‣ New ‣ Project....

    1. Choose the PyDev folder and PyDev Project and choose the Next button.
    2. Give your project a name, for example “myproject”.
    3. Choose version 2.7.
    4. Choose Please configure an interpreter before proceeding.
      1. Choose Manual Configure.
      2. Choose the New button.
      3. Browse for Python 2.7. On RedHat and CentOS this is probably /usr/bin/python.
      4. Choose the Ok button.
      5. Choose the Ok button.
    5. Select the interpreter you just setup from the Interpreter drop-down.
    6. Choose the Finish button.
    7. When prompted “This kind of project is associated with the PyDev perspective. Do you want to open this perspective now?” choose Yes.
  6. Right click your project folder, for example, “myproject”.

    1. Choose Properties.
    2. Choose PyDev - PYTHONPATH in the left hand pane.
    3. Choose the External Libraries tab.
    4. Choose Add source folder button.
    5. Browse for the Trusted Analytics Platform Python REST Client libraries. On RedHat and CentOS these are found under ‘/usr/lib/trustedanalytics/rest-client/python’.
    6. Choose the OK button.
  7. Right click your project folder, for example, “myproject”.

    1. Choose New ‣ Source Folder.
    2. Give it the name “src” and choose the Finish button.
  8. Right click src folder and choose New ‣ File.

    1. Give the file name ‘test.py’.

    2. If prompted, confirm the default settings for PyDev by choosing OK.

    3. Close the Help keeping PyDev alive dialog, if it appears.

    4. Type the following code into test.py:

      import trustedanalytics as ta
      ta.server.host = "correct host name or IP address"
      ta.connect()
      ta.server.ping()
      
  9. Choose Run ‣ Run.

    1. Choose Python Run and choose the OK button, you should see the output:

      Successful ping to Trusted Analytics ATK at http://localhost:9099/info
      
  10. Next take a look at the included examples.