This is a possible solution for the problem with Lyx 1.3.2 & Python on Windows. I had the
exact problem in converting latex to lyx and while searching the mail-archives,
I could not found a solution. So the following tweaks I found may help some using
Lyx (1.3.2) on Windows 2000.


In the file  LYXDIR\share\lyx2lyx\lyx2lyx.bat, add the two lines
        set PYTHONHOME=LYXDIR\bin\lib\
        set PYTHONPATH=LYXDIR\bin\lib\;LYXDIR\bin\DLLs
as otherwise it keeps producing the 'import error - use traceback option' message.

Also replace the existing python command
d:\latex\lyx\bin\python %0 %1 %2
with
d:\latex\lyx\bin\python -S %0 %1 %2
Without the option -S, python tries to import 'site' values from site.py which
does not exist in Lyx 1.3.2 release (on Windows). So it produces an error. The '-S'
option asks it to ignore importing site options. (Anyone who knows Python can correct
this.)


Now, when you say import from LaTex (foo.tex), Lyx will convert the file foo.tex
to foo.lyx in Lyx 1.5 format. There is still some error in converting to format 221
with the in-built script. So to achieve this final step in conversion from Latex to Lyx,
execute the command
LYXDIR\lyx2lyx.bat foo.lyx > temp.lyx
and then
del foo.lyx
ren temp.lyx foo.lyx


This worked for me. Hope this helps others too.


- Anbu.




Reply via email to