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.
精彩评论