Python in NetBeans IDE 7.4

Let's set up NetBeans IDE 7.4 to use Python.

Go to Tools | Plugins and the Plugin Manager opens. In the Settings tab of the Plugin Manager, add a new update center with this URL:

Then go to the "Available Plugins" tab of the Plugin Manager and you'll find Python:

After installing the Python plugin, go to the New Project wizard and create your new Python project or import an existing Python project:

Then have fun with Python:

There's lots of features for Python, including debugging and code coverage.

If you don't expect it to be 100% perfect, you'll be 80% satisfied.


Nice. But it will be difficult for NB as Idea has free python plugin now. If only this was one year earlier ... I know people who got stuck with NB 6.x just because Python support was removed.

Posted by bubbles.way on December 21, 2013 at 02:06 PM PST #


Posted by guest on December 21, 2013 at 06:19 PM PST #

Hello Geertjan,

Thanks for the post. I downloaded the netbeans about 1 month ago, and I was disappointed when I see that it doesn't support python. As I remember Netbeans had python support on previous releases. Why did Oracle drop support? How old is that plugin you downloaded from deadlock repository? The name "Deadlock" doesn't sound promising for active projects :)

Posted by guest on December 21, 2013 at 11:06 PM PST #

Python support has never been removed, it's always been available. It's stable, no more work needs to be done to it, hence that's why it's not being actively developed. It does what you need it to do, so download it and use it.

Posted by Geertjan on December 22, 2013 at 12:29 AM PST #

"it's stable, no more work needs to be done to it"

Sorry, can't agree. Even simplest things do not work. Autocomplete or go to declaration for example. Without it, IDE is nothing more than a text editor. Rename local var throws exceptions and so on.

class Child:
def mybar(self):
print "bar1"

class Parent:
def __init__(self):
child = Child()
child.mybar()# autocomplete, go to declaration???

if __name__ == "__main__":
p = Parent()

Posted by guest on December 22, 2013 at 05:17 AM PST #

From the screenshots above you can see that autocomplete works. And, yes, it's not perfect. Still, it's hard to say it's nothing more than a text editor when it has a debugger and code coverage, to name just two things, isn't it?

Posted by Geertjan on December 22, 2013 at 09:25 PM PST #


for method mybar() autocomplete does not work, as well as go to declaration. Without it, it is not really an IDE.

The sad thing is, it did work in netbeans 6.7 if I remember correctly

Posted by guest on December 23, 2013 at 12:20 AM PST #

Somehow having problems getting into my blog at the moment, plus several comments got deleted. Will take a look at this problem, but refuse to accept that without code completion something can't be called an IDE.

Posted by Geertjan on December 23, 2013 at 12:26 AM PST #

"guest", can you drop me an e-mail at Communication easier via e-mail.

Posted by Geertjan on December 23, 2013 at 12:28 AM PST #

This is great but I think that Python in IDE's (any IDE I know that supports Python) starts from an incorrect assumption.
I mean, when you do Python, you write a script in one file and, when it tends to grow too big, you split off classes to separate files. And when they seem to be usefull in other scripts, they go to separate modules.
I, for one, never start with a 'project' in mind. I just have a big pile of scripts in some directory to do my 'dirty', tinyish work for which I do not want to start a full blown jave or c++ project.
I can imagine that people who write full blown (gui) applications in Python will see it differently. But, for my 'dirty' Python work, it is just overkill.

Posted by guest on December 23, 2013 at 01:14 AM PST #

Sorry - but python support in netbeans proofs, that the saying "The moment you stop working on a software, you've got a bug" is true. It rots - in this case I opened a python file, marked a sequence, pressed some keys and got an exception. I would have expected the marked sequence to be replaced. FAIL.

So while it's nice, that there is potential python support, please don't repeatetly tell people, that python support is in netbeans ...

Posted by guest on December 25, 2013 at 02:35 PM PST #

Really, steps, please. Don't know what "marked a sequence" means. Steps, so I can reproduce it.

Posted by Geertjan on December 25, 2013 at 03:08 PM PST #

0. Create sample file:

#! /usr/bin/python
# -*- coding: utf8 -*-
config = {}

1. Open sample file (outside of a project!)
2. Double click on config to mark the sequence of characters
3. Begin typing

I would have expected that in step 3 the marked sequence is deleted and replaced by the first character I typed in that step.

But I get:

java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(
at org.netbeans.modules.gsf.GsfEditorKitFactory$GsfEditorKit$GsfDefaultKeyTypedAction.replaceSelection(
at org.netbeans.editor.BaseKit$DefaultKeyTypedAction$
at org.netbeans.editor.GuardedDocument.runAtomicAsUser(
at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(
at org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(
at org.netbeans.modules.gsf.GsfEditorKitFactory$GsfEditorKit$GsfDefaultKeyTypedAction.actionPerformed(
at org.netbeans.editor.BaseAction.actionPerformed(

Posted by guest on December 26, 2013 at 07:45 AM PST #

yes, just select a string and start typing. You'll get an IDE exception. And yes, it used to work in previous versions < 7. Python support in Netbeans was "almost there", but I wouldn't recommend it as python IDE right now.

Posted by guest on December 26, 2013 at 01:01 PM PST #

I don't get the error you describe. Anyway, can you drop me an e-mail at That will help, thank you.

Posted by Geertjan on December 26, 2013 at 02:18 PM PST #

Everyone seems to be complaining, I just want to thank you and everyone who worked on it for the plugin - and the articles

I've been using Netbeans's Python plugin for years, I've tested many other IDE's but none of them was able to replace my Netbeans/Python setup

Yes there are/have been fluctuating minor bugs, but it has always been usable

Anyway thanks

Posted by Kaan Soral on December 30, 2013 at 03:28 PM PST #

@Geertjan: Ok - so I narrowed it down - what I see is most probably bug #209401 - 22 months ago this was filed. I'll add my comment to that bug.

Posted by guest on January 03, 2014 at 11:00 AM PST #

Use the final release, not some random development build, of NetBeans IDE 7.4. That's what I'm doing and not seeing the problem you describe.

Posted by Geertjan on January 03, 2014 at 11:05 AM PST #

As described in the bugreport (maybe this discussion should be there, as with your explanation you could close the bug as NOTABUG...):

This _is_ reproducible:

Create as:

#! /usr/bin/python
# -*- coding: utf8 -*-
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
config = {


- Download fresh install of minimum Netbeans (Java SE-Build from as ZIP download)
That results in
- Create empty cache and userdirs (no I won't trash my running configuration just for a test!)
- Unzip Download
- Run the fresh copy of netbeans (netbeans/bin/netbeans --userdir c/h --cachedir c/c)
- Accept licence
- Decline import of config from 7.3
- Install all provided auto updatesar
- Restart netbeans as requested
- Add Deadlock Repository (
- Install _only_ the plugins "Python" and "Jython Distribution"
- Restart netbeans as requested
- Open via File -> "Open File"
- select the word config (double clickinig, by keyboard select (arrow keys while holding shift) or mouse marking (click in front of word, hold left mouse button, move mouse behind word, release mouse button)
- Press key "L"
- You will see a red notification bubble in the lower right corner of the netbeans window
- Clicking that opens the notifications area
- A "Unexpected Exception" is shown, with a priority of silent

I can zip the install dir and you can try it yourself!

Just for the record: I'm not in the habit of judging a system from experimental builds.

Oh and the netbeans install I tested with was also downloaded - do you have reason for you accusation? I took the time to dig the bug report, reproduce it, add additional information AND A PATCH - not sure what more you'd expect.

Posted by Matthias on January 04, 2014 at 03:46 AM PST #

The bug is fixed - the patch was pushed into the repository. The nightly builds (see link in Geertjans post) already contain the fix.

Please note, I forgot to increment the version number, so the fix won't be available via autoupdate. To fix this, please:

1. Locate your netbeans userdir:
2. Change into directory "modules"
3. Delete the following files (=> this removes the problematic file and allows reinstallation of python support):

org-netbeans-modules-python-* (Everything, that starts with org-netbeans-modules-python)

4. Reinstall Python support following the steps in Geertjans post.

Thanks to the netbeans team (in this case Milutin Kristofic) who kindly pushed the change, even though its not his module.

Posted by Matthias on January 08, 2014 at 03:50 AM PST #

Great, well done, and thank you!

Posted by Geertjan on January 08, 2014 at 05:11 AM PST #

Great! I hope, that the Python will be included as standard Language in NetBeans in future! ;)

Posted by guest on January 22, 2014 at 04:20 AM PST #

Can't get auto-complete to work?


if __n

As in the third screenshot, nothing appears. Fresh install of NB 7.4 with the plugin.

Runs the test ok, just doesn't autocomplete - is there an option required?

Posted by CSpeare on February 04, 2014 at 03:27 AM PST #

Great tutorial! I like Python IDE!

One remark (because it took me hours to figure out what was wrong):
I would recommend to disable the Update Center for Python IDE ( after the Python IDE is installed. In my first attempt, I did not do that. This caused the "C/C++"-plugin to update from to After this update, NetBeans did not function as it should: the "Tools" > "Plugins" and "Tools" > "Options" popup windows from the menu did not work anymore... and some other things did not work anymore... in short, it makes NetBeans unusable...

Posted by Jochen on February 06, 2014 at 01:34 AM PST #

Is there a Python Shell for this plugin or some equivalent?

Posted by guest on February 07, 2014 at 07:53 AM PST #

Is there a place to contribute to this plugin? It would be great to include Python 3 support or, at least, update the python console to 2.7.x

Posted by Camilo on February 18, 2014 at 06:20 PM PST #

Awesome, thanks.

Posted by Sid on February 20, 2014 at 07:32 PM PST #

thank you, it's really useful

Posted by guest on March 06, 2014 at 08:09 AM PST #

Thanks!Thats very nice topic

Posted by guest on March 12, 2014 at 09:26 AM PDT #

Does anyone know why i can't get plugin? Downloading stucks at couple percents.

Mayby someone has same problem?

Posted by guest on March 16, 2014 at 10:08 AM PDT #

Thanks so much!

Posted by guest on March 16, 2014 at 09:19 PM PDT #

This helped me. Thanks alot.

Posted by chandu on March 25, 2014 at 11:59 PM PDT #

I felt very depressed when I tried to install python plugin on netbeans. I don't know why the editor always tell me my java version is less than 1.7.0, actully it is 1.7.0. BTW, my netbeans's version is 7.3.1, not 7.4.

Posted by roberson on April 09, 2014 at 10:11 PM PDT #


After i installed the python plugins i cant open the plugin or preferences menu anymore!
The message appears: org.openide.notifydescriptor.isnodefaultclose()Z

Can you help me please!?
greetings oli

Posted by Oli on April 13, 2014 at 09:29 AM PDT #

Just a quick thank you.
Have been struggling for last few months and then came back to see if there had been any developments.
There have.
I can now move forward again

Posted by guest on April 22, 2014 at 04:46 AM PDT #

I'm using Netbeans 8.0, and jdk1.8.0. Following your instructions for Netbeans 7.4, things went smoothly. But when trying to run a Python pgm., I get the following:
\Java\jdk1.8.0\bin was unexpected at this time.

Any suggestions?

Tim Paysen

Posted by guest on April 29, 2014 at 03:48 PM PDT #

Sir, We link to extend( and add some functionality to this Python plug-in. For that, we needed to know the projectType of this plugin. Where can we get it.

Thanks & Regards

Posted by Chandrakumar M on May 13, 2014 at 09:10 PM PDT #

Sir, We link to extend( and add some functionality to this Python plug-in. For that, we needed to know the projectType of this plugin. Where can we get it.

Thanks & Regards

Posted by Chandrakumar M on May 13, 2014 at 09:12 PM PDT #

Wow! I am enjoying it! I love you!! :D

Posted by guest on July 03, 2014 at 10:42 AM PDT #

What a nightmare it is to execute code and test it?
Is it even possible?

Posted by Ian Gregory on August 04, 2014 at 06:30 PM PDT #

My Netbeans 7.4 crashed after installation of this python.
Now I can't even open the IDE. It hungs on memory and don't open the IDE

Posted by Jafar on February 28, 2015 at 03:56 AM PST #

Stop using NetBeans IDE 7.4. It's really old. Uninstall it. Install NetBeans IDE 8.0.2 and follow the Python steps here:

Posted by Geertjan on February 28, 2015 at 03:57 AM PST #

From the screenshots above you can see that autocomplete works. And, yes, it's not perfect. Still, it's hard to say it's nothing more than a text edit

Posted by guest on April 21, 2015 at 05:34 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« June 2016