On Monday 09 August 2004 12:00, He Jin wrote: > Hi everybody, > > I found a very strange problem in win32/cygwin environment using lyx > commandline. > > When I try to translate a lyx file into .tex format using command line > "lyx --export latex YYY.lyx", it reported as following: > > ****************************************************** > Traceback (most recent call last): > File "e:/lyx/lyx/share/lyx/lyx2lyx/lyx2lyx", line 18, in ? > import getopt, sys, string, re > ImportError: No module named getopt > ------------------------------ > ERROR! > An error occured while running the conversion script. > ****************************************************** > It sounds like the installation of LyX win32 lacked some module named > "getopt" but I found getopt.py and getopt.pyc in > the e:/lyx/lyx/bin/lib/ directory.
getopt belongs to the standard python library so it should be there. What version of python are you using? > Besides, some other files could be translated smoothly and if I use the > "export" option in LyX GUI, the YYY.lyx could also be sucessfully > translated into YYY.tex. > > Anybody could give some hints ? lyx2lyx is needed to convert older lyx files to new formats, if you using a file that you wrote with the same version it is not needed. To test if your python setup is correct please go to the command line and call python python inside python place this line and tell us what is the result import sys; print sys.modules > Best regards, > > He Jin I hope this helps, -- José Abílio