OS X, Python 3.3, LiClipse

Yesterday I tried to get Eclipse and PyDev installed on my MacBook Pro (running Mavericks). After a couple of hours of struggling I gave up and discovered LiClipse which is a highly recommended system for working with Python and many other languages from the Eclipse framework.

I used a clean OS X Mavericks virtual machine to get my installation nailed down, especially important since I wanted to work with Python 3.x.

Downloads

Download and install:

  1. Python 3.x.
  2. Java 7.
  3. LiClipse: click the Google Drive link, select the latest version (currently 0.9.6), click and download the OS X file (currently liclipse_0.9.6_macosx.cocoa.x86_64.dmg), then install using all default options.

Configuration

Eject all download package (DMG) folders on the desktop.

Use Finder and go to Applications, open the liclipse folder, then drag the LiClipse app to the dock.

Run LiClipse. If a software update prompt appears for Java SE 6 then install it.

Accept all defaults when starting for the first time and restart the app.
 
Select File / New project, then select PyDev/PyDev Project:
ad45e741fc7fadfa78252bb606d55228

Hit Next, then set a project name and click the link to configure an interpreter:

489ed184ec9e6e8b074feccf177fcb78

Select the advanced configuration option:

ff2c2bbde406a0db49eae0d0d91f25e7

Then select python3.3:

32ca7a2249fdaa5c7ab1905a39b37dbb

On the next screen make sure all folders are selected:

378876332975796581d1a1bba04b66ee

Back on the new project screen make any other changes – I opted not to configure the Python path – then click Finish:

04b122222be512f58fe0f7fa062a8801

The Open Associated Perspective prompt may appear – I chose to associate the project with the PyDev perspective:

0a8180c02287ff3b076f068ffd8b3004

These Python and perspective settings will be used the next time LiClipse is started for Python projects.

Quick Python test

Following on from the above new I added a new Python file, entered a couple of lines of code, and ran it:

5b8f1d79fa162facf4e384b1394d0a99

132a82e84ba8b7066edba59927094d74

4a997671f4a90eee79e6c84d6342f354

638b29041e54c6d81427455cf5407130

feb22a04d91362315bae7493317c90ec

Debugging

If the debugger is used, for example by stepping through the code, there’ll be an option to switch to another perspective – this should be used for debugging:

a8a26c331c032792e467e96787890a55

This presents more window areas for examining variables, viewing the editor and console output, etc:

a9b4613df5986bd7bd9915660c715f15

After the debugging session is complete the Debug perspective will still be active. To switch back to the original perspective use the menus:
  • Window | Open Perspective | Other, then select PyDev.
Advertisements

One thought on “OS X, Python 3.3, LiClipse

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s