Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up Python in Netbeans

I remember successfully doing this countless times before with a bit of trial and error, but after a new reinstall of Snow Leopard, I would like to just ask the Stackoverflow community this for once and for all...

I installed Netbeans 7 (for C++). For some reason, I didn't see any way to install Python plugins here, so I installed Netbeans 6.5. It automatically detects Python 2.5 on the system, but darnit I want Python 3, which it cannot automatically detect. So now I go to Tools > Python Platforms, click on New, and which file do I select in the new window?

EDIT: I found this when looking in usr/bin/.enter image description here

EDIT: For my own future reference, in Eclipse at least, /Library/Frameworks/Python.framework/Versions/3.2/Resources/Python.app/Contents/MacOS/Python

I found the alias in .../3.2/bin/python3.2

like image 615
wrongusername Avatar asked Dec 21 '22 15:12

wrongusername


1 Answers

Unfortunately Netbeans seem to have dropped support for Python in version 7. I find it pretty annoying as it seems to work ok in 6.9.1 (although I resort to Eclipse for serious Python programming as PyDev has better code completion).

So, your options are

  • Download 6.9.1, and get the python plugin via tools--> plugins

or

  • Attempt to hack the previous version plugin together with version 7, as described here: http://forums.netbeans.org/ptopic38275.html and here http://forums.netbeans.org/topic37805.html - I've copied in the appropriate post below. The forum mentions code completion causing crashes, so YMMV.

To summarise the forum post: "Just go to Tools->Plugins, click Settings. Click Add, and add a new "Update Center" , name it like "Python plugin is here", and in the link, paste this:

http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz

Then go to Avaliable Plugins, do "Reload Catalog" - you should see stuff under "category" Python. Select the plugin and click install. Netbeans will ask you to restart itself. Then you should see Python under installed plugins (make sure to click "Show Details" there.)"

like image 150
TimStaley Avatar answered Jan 07 '23 20:01

TimStaley