LyX system reconfiguration failure

I recently ran into a LyX error on a Windows installation that was previously working without a hitch. I have tried reinstalling LyX and MiKTeX with no success. When I open LyX, the document classes are not available. When I try to reconfigure LyX, I get the error:

The system reconfiguration has failed. Default textclass is used but LyX may not be able to work properly. Please reconfigure again if needed.

The error log shows the following:

16:37:25.964: Running configure... 16:37:25.989: python -tt "C:/Program Files (x86)/LyX 2.1/Resources/configure.py" --binary-dir="C:/Program Files (x86)/LyX 2.1/bin/" 16:37:26.060: checking for DVI to DTL converter... 16:37:26.062: +checking for "dv2dt"... yes 16:37:26.063: checking for DTL to DVI converter... 16:37:26.065: +checking for "dt2dv"... yes 16:37:26.066: checking for a Latex2e program... 16:37:26.067: +checking for "latex"... yes 16:37:26.068: checking for a DVI postprocessing program... 16:37:26.069: +checking for "pplatex"... yes 16:37:26.071: checking for pLaTeX, the Japanese LaTeX... 16:37:26.072: +checking for "platex"... yes 16:37:26.073: Traceback (most recent call last): 16:37:26.074: File "C:/Program Files (x86)/LyX 2.1/Resources/configure.py", line 1536, in <module> 16:37:26.076: LATEX = checkLatex(dtl_tools) 16:37:26.077: File "C:/Program Files (x86)/LyX 2.1/Resources/configure.py", line 480, in checkLatex 16:37:26.078: if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1: 16:37:26.080: File "C:/Program Files (x86)/LyX 2.1/Resources/configure.py", line 68, in cmdOutput 16:37:26.081: cmd = 'cmd /d /c pushd ' + shortPath(os.getcwdu()) + '&' + cmd 16:37:26.082: File "C:/Program Files (x86)/LyX 2.1/Resources/configure.py", line 84, in shortPath 16:37:26.084: from ctypes import windll, create_unicode_buffer 16:37:26.085: File "C:\Anaconda\Lib\ctypes\__init__.py", line 10, in <module> 16:37:26.086: from _ctypes import Union, Structure, Array 16:37:26.087: ImportError: DLL load failed: %1 is not a valid Win32 application. 16:37:26.089: Reloading configuration.....\..\..\src\support\Systemcall.cpp (292): Systemcall: 'python -tt "C:/Program Files (x86)/LyX 2.1/Resources/configure.py" --binary-dir="C:/Program Files (x86)/LyX 2.1/bin/"' finished with exit code 1 16:39:00.090: (reconfigure)

It looks like the error occurs after python -tt "C:/Program Files (x86)/LyX 2.1/Resources/configure.py" --binary-dir="C:/Program Files (x86)/LyX 2.1/bin/"

. When I run the command through cmd

, it runs without any error. What else should I do?

+3


source to share


2 answers


If you can run the script, you can just go cd

to your custom LyX directory (on Linux it is ~/.lyx

. For Windows see Help> About) and run the configure command inside that directory. Do it without using LyX. Then open LyX. It should now work fine.

So, to be clear, don't run reconfiguration in LyX (as it doesn't work). Regarding this issue, we received several similar reports from Windows users. The wild guess is that LyX needs to run python 2.x and somehow 3.x works. Another hunch is that some PATH screens don't work through the GUI (like parentheses or space).



Note, however, that I've only used LyX on Ubuntu, so this is really wild guess.

+1


source


I fought for a whole day with this and could not go anywhere until I found what I consider to be a problem. Here's what I did:

1) opened command prompt in windows with administrator rights.

2) went to directory containing lyx.exe 'c: \ program files (x86) \ lyx 2.1 \ bin' on my machine.

3) lyx.exe is executed

4) everything related to python calls failed - reconfigure (which uses configure.py) by opening old docs (which uses lyx2lyx), etc.

5) the fox went back to the command line



6) typed 'set pythonpath =' on the command line, which clears the pythonpath.

7) at the command line typed 'set path =' which clears the path.

8) typed lyx.exe to re-login to lyx

9) now everything works!

I'm not sure about the relevant information here, but I'm running Windows 10 with a 64-bit python installation. I believe the python lyx calls are trying to start my python installation and not the one that comes with Lyx and here's the problem - the two are incompatible. Cleaning up the python path and path, it seems that Lyx is trying to find the installed python and everything works.

Hope this helps someone and the Lyx developers.

+1


source







All Articles