NetBeans 6.5, Python Support, and Mac OS X

November 26th, 2008

The NetBeans team recently released version 6.5 of the NetBeans IDE, which I really, really like. They also released an Early Access peek at the Python support coming for NetBeans. Unfortunately, it’s not straightforward to get Python and Java EE support in the same installation. The Python EA release is a complete NetBeans installation, i.e., you can’t just add the modules to an existing NetBeans installation.

Fortunately, there is a pretty easy solution to this: if you already have an existing 6.5 installation, you can simply run the Python EA installer, which will detect the existing 6.5 install and update it to add Python support. Unfortunately, the installer has a bug on OS X, which breaks this functionality. The end result is that your existing installation is replaced, which is likely not what you want. The good news is that there is a workaround, albeit ugly and manual, to get us Mac users running while they fix the installer issue. Here are the steps I followed to add Python support to NetBeans 6.5 on the Mac (big thanks to the NetBeans Users list for the tips that led to this solution):

  • Make sure NetBeans is not running
  • Download python cluster separately from http://download.netbeans.org/netbeans/6.5/python/ea/zip.html (search for netbeans-6.5-200811131701-python.zip — or whatever the latest is — in the second list “Module Clusters”)
  • Put contents of the python1 directory in the zip in ~/.netbeans/6.5
  • Delete directory ~/.netbeans/6.5/var/cache
  • Add “python1″ to /Applications/NetBeans/NetBeans 6.5.app/Contents/Resources/NetBeans/etc/netbeans.clusters
  • Start NetBeans
  • Profit? :)

You should now be able to create a new Python project. The installer bug should be fixed in the next release (my guess is that it’s already fixed in the NB hg repo), but these “easy” steps should get you going in the interim.

Technorati Tags: ,

Popularity: 24% [?]

5 Comments

  1. Amit says

    Hi!

    Thanks for sharing the tip. Just wanted to share with you couple of things:

    1. Since this is a EA release, hence we do not have the Python bits in the update center.
    2. The workaround works great on Linux, thanks for sharing the tip for Mac OSX

    Best,
    Amit

    November 26th, 2008 | #

  2. Jason Lee says

    Amit,

    I assumed as much, but it’s good to make sure that info is explicit. Congrats on a solid release. I’m using NetBeans for Java, Python, and PHP, and loving every minute of it! :)

    December 1st, 2008 | #

  3. Ron Georgia says

    Excellent tip. Everything worked well.

    December 8th, 2008 | #

  4. Dmitry A. Erokhin says

    Great trick! Thx a lot.

    I think, that it will be more correctly to put “python1″ directly in the “/Applications/NetBeans/NetBeans 6.5.app/Contents/Resources/NetBeans”, because during the NetBeans developers logic, all “aditional” items are there (“ruby1″, “php1″ et cetera).

    For me it works great in both cases.

    One more note: if you already have got the jython in your system, you may delete “jython” from “python1″ folder and set up different location in NetBeans later.

    December 15th, 2008 | #

  5. Lothar says

    Thanks for the inspiration.
    I adapted your set up for my netbeans installation on windows: http://amitksaha.blogspot.com/2008/11/working-with-netbeans-ide-for-python-ea.html?showComment=1235384520000#c3811171739888263429 .

    February 23rd, 2009 | #

Sorry, the comment form is closed at this time.

With many thanks to Kaushal Sheth
`