Colin J. Williams wrote:

> 
> When I attempt to open the created Hello.lyx, I get the "Can't open
> conversion script" message.
> 
> I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from
> the lyx\bin.  In  view  of your  comments  above,  I  reinstalled  LyX
> 1.3.5  and then renamed Python23 to Python23Z.   I  get  the  same
>  message.

This is rapidly becoming a LyX/Win FAQ. Indeed, much of the information 
you require is detailed in the rest of this thread. However, I think that 
a recap might provide you with some illumination.

The reLyX Perl script converts your LaTeX file to a file in a mish-mash of 
different LyX file formats and it is this mish-mash LyX file must be 
sanitized by the lyx2lyx Python conversion script.

It is this conversion script, lyx2lyx, can't be run because it is invoked 
by LyX as 

  <path to>\lyx2lyx --output <new file>.lyx <old file>.lyx

Invocation of the script in this way is perfectly fine in a Unix 
environment because the shell will look at the first line of the script to 
ascertain what interpretter (python) should be used. Windows doesn't 
follow this tradition. Instead it looks either for a ".py" extension to 
the script name or requires that the script be invoked as

  python <path to>\lyx2lyx --output <new file>.lyx <old file>.lyx

Since the invocation is hard-coded into the LyX executable, you can't 
change it. Tough.

A work-around has been suggested, however. Place a file "lyx2lyx.cmd" in 
the same directory as the lyx2lyx python script. This file should contain 
the line:

@ <path to python>\python <path to lyx2lyx>\lyx2lyx %*

You can also run these scripts from the CMD prompt.

PROMPT> reLyX -f hello.tex
PROMPT> python <path to lyx2lyx>\lyx2lyx -o sanitized_hello.lyx hello.lyx

This sanitized_hello.lyx should be loadable by LyX 1.3.x without further 
conversion. This assumes, of course, that reLyX has done a reasonable job 
of converting your LaTeX file in the first place.

Alternatively, you might consider using tex2lyx. Read about it here:

   http://wiki.lyx.org/LaTeX/LatexToLyx

-- 
Angus

Reply via email to