开发者

Netbeans not allowing Python 2.6 as default platform (forcing Jython2.5)

开发者 https://www.devze.com 2022-12-18 22:37 出处:网络
I am trying to get Netbeans python to run with the default python platform set to Python 2.6.1 (my system python), so in Netbeans I do the following:

I am trying to get Netbeans python to run with the default python platform set to Python 2.6.1 (my system python), so in Netbeans I do the following:

Tools -> Python Platform

Set Python 2.6.1 to 'default'

However, it seems impossible to make this stick. Whenever I restart Netbeans it's back to Jython 2.5 again.

Moreo开发者_如何学Cver, I can obviously autodetect and find Python 2.6.1, but whenever I make it "Default", Netbeans still runs with Jython 2.5 in that very session. (I know this because when I import sys and do a sys.path it only has Jython library dirs). And when I remove Jython I get the error:

"Selected project has broken python platform : default => bind to an existing python platform in project's properties".

I have tried this is 6.5 and 6.7. And I still get the same behavior. Furthermore, I know my system python works because I can use the python interpreter.


Looks like http://netbeans.org/bugzilla/show_bug.cgi?id=180693 which provides a clumsy and non persistent workaround.

This needs heavy complaining on the netbean bug tracker imo.


Might be worth logging a bug with Netbeans about the first bit of behaviour you described - I can confirm similar (although strangely not identical) symptoms on my system.

I tried this with Python 2.6.2 / Netbeans 6.5.1

NetBeans IDE 6.5.1 (Build 200903060201)
Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)

And my default Python platform also doesn't seem to stick: I restart and the default is back to "Jython 2.5b0+"

However, when I create a new Python project: the drop-down on the wizard is correctly set to 'Python 2.6.2": furthermore, when I created a new module like this:

import sys
print(sys.path)

It reports back correctly:

...'d:\\python26\\DLLs', 'd:\\python26\\lib'...

Maybe this is due to something about the slightly different Python platform versions - dunno?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号