Paul A. Rubin wrote:
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.
Sounds like a path problem (the Python files are there but Python can't find them).
Besides, some other files could be translated smoothly
From a command line, starting in the same directory?
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 ?
Best regards,
He Jin
-- Paul
This worked Ok for me. Python 2.3 is my default.
C:\LyX\Tex\Files>..\..\lyx\bin\lyx --export latex M1.lyx M1.tex ---------------------------------------- Cannot open specified file: M1.tex Create new document with this name? Assuming answer is yes ---------------------------------------- Document exported as LaTeX to file `C:/LyX/Tex/Files/M1.tex'
C:\LyX\Tex\Files>dir M*.* Volume in drive C is Root Directory Volume Serial Number is 008B-9A21
Directory of C:\LyX\Tex\Files
04-08-17 12:41 PM 16,586 m1.lyx 04-08-17 12:35 PM 16,340 m1.lyx~ 04-08-17 19:36 PM 12,132 M1.tex 04-08-13 09:38 AM 3,453 M2.lyx 04-08-13 08:37 AM 2,397 M2.lyx~ 04-08-17 08:34 AM 1,781 M3.LyX 04-08-16 20:44 PM 1,859 M3.LyX~ 04-08-16 20:55 PM 1,725 M4.LyX 8 File(s) 56,273 bytes 0 Dir(s) 2,343,645,184 bytes free
The output looks plausible, although I haven't yet found a way to convert this
to something legible.
Previously, I had tried to do a latex export of M1.lyx - no luck.
Colin W.