开发者

ImportError: No module named optparse in jython

getting

Traceback (most recent call last):
  File "C:\projects\myproject\convert.py", line 139, in <module>
    import optparse
ImportError: No module named optparse.

when executing it using jython. Same module works开发者_运维百科 fine when i execute it through python.

I am usinng window7 operating system. The same modle works fine on windows XP machine with both python and Jython.


My guess is that you're using Jython 2.2, which, according to the FAQ:

Jython 2.2 does not implement any features added to CPython in version 2.3 or later.

Where optparse was added in Python 2.3.

The newest version of Jython is 2.5.1, so you'll probably want to go ahead and download it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜