On 2010-04-14, Benjamin Kay wrote:

> *Run python from the command line:*
> Python 2.6.4 (r264:75706, Dec  7 2009, 18:43:55)
> [GCC 4.4.1] on linux2
> I tried running 2+2; and that worked.
>
> *Run /usr/lib/python2.6$ python site.py from the command line:*
> sys.path = [
...
> ]
> USER_BASE: '/home/bkay/.local' (exists)
> USER_SITE: '/home/bkay/.local/lib/python2.6/site-packages' (doesn't exist)
> ENABLE_USER_SITE: True

OK.

OTOH, you got the error

>> 'import site' failed; use -v for traceback

What happens if you run python interactively and type

  import site
  
?

If this works, chances are that LyX calls a different Python binary.

> *As far as I can tell I didn't have a PYTHONPATH. I added
> PYTHONPATH=/usr/local/lib/python2.6 and export PYTHONPATH to my .bashrc and
> got the same set of errors*

So you can remove this again. The PYTHONPATH variable is only needed
to customize sys.path but site.py should be on the standard
python-library-path as set up by the system.


> C:\Program Files\LyX16\bin>tex2lyx latexexample.tex
> Creating file C:/Program Files/LyX16/bin/latexexample.lyx
> \end{document} does not match \begin{center}
> \end{verbatim} does not match \begin{document}
> \end{document} does not match \begin{verbatim}
> Bug: Ignoring par-level extra stuff '\noindent
> '
>
> *Which generates a file I can open with lyx, which is good.

I am impressed that even with a bug in the latexexample.tex file
(unbalanced environment markers) a valid lyx file is generated.

Günter

Reply via email to