Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Netbeans - Add Python Support

Netbeans is my IDE of choice as a PHP, Java, and C++ developer on Linux (but it also works on windows). Unfortunately there is no download option for supporting python. Also, you will not find "python" plugins when searching for installable plugins from the plugin manager. This tutorial will show you how to install python support manually. It's quite easy and works for Windows users too.

Steps

download any version of netbeans 8.0.2. I used the small HTML5 + PHP version which is only 63MB.

Go here and download the zip.

Extract the zip to a new directory that you will remember the full path of.

Go to the Plugin Manager in NetBeans IDE by clicking Tools > Plugins.

Click the Downloaded tab.

Click Add Plugins and browse to the folder where you unzipped the files.

Select them all.

You will have to accept that none of the plugins are "signed".

Now when you create a project with File > New Project (cntrl + shift + n), you will see Python in the main listings, with the option to create a new python project or create one from scratch.

Adding Python 3

By default for Linux users, the plugin initially only has Python 2.7 support. Run the following steps to add python3.

From the new project window, select "next" after choosing to create a new Python project.

At this new window, you should see "python platform" with a dropdown menu listing python 2.7.6 and beside that is a button called manage. First check that there is no python 3.x option and if there is not click the "Manage" button.

On the far left there should be a listing of all the python platforms and only listing 2.7.6. Towards the bottom, there is button called "New". Click it to create a new python platform for python 3.

Navigate to /usr/bin and click the python3 file once before clicking the "open" button.

Now that platform has been created for you, it would be a good idea to click the "Make Default" button unless you find that you are mostly supporting legacy 2.7 applications rather than creating new ones.

References

Last updated: 25th March 2021
First published: 16th August 2018