This is my old post.
I have been trying to install LyX, but the same error message pops out when I excute LyX.exe as follows:
LyX: No textclass is found
LyX will only have minimal functionality because no textclasses have been found. You can either try to reconfigure LyX normally, try to reconfigure without checking your LaTeX installation, or continue.
(Press the button) Reconfigure (or) Without LaTeX (or) Continue
Before LyX, I used TeXLive as my tex distribution, and I'm using Windows 10.
Here's what I have done to fix the problem in a chronological order:
I installed LyX, and it did not work. I followed the instructions given in the link https://www.youtube.com/watch?v=kALm051M0iA&t=179s
I thought TeXLive was not okay as a tex program for LyX, so I installed MikTex 2.9.
In the old post, a commenter corrected me to use only one tex distributions for LyX, and recommended me to delete all of the three programs, and do it again.
I did it so, and I installed TeXLive(this is because I'm used to it) and LyX, and with the same error message.
http://www.ktug.org/xe/index.php?mid=KTUG_open_board&document_srl=174234 This link suggests to replace the "configure.py" file by new one attached in the link, and I did it, but the same result.
As a commenter says, I emailed to email@example.com to ask for advice, and one user answers very kindly, and the following are his suggestions and the corresponding results.
I opened a Command Prompt (Start Menu -> cmd.exe) and type "where pdflatex." The result was
where the installation program of LyX chose as a path to latex.exe.
- I "reconfigured" LyX (Tools -> Reconfigure), then LyX says
The system reconfiguration has failed. Default textclass is used but LyX may not be able to work properly. Please reconfigure again if needed.
I still have the message after I restart LyX.
- Now, I tried the suggestions in the link:
8.1) opened a command prompt in windows with administrative privileges.
8.2) navigated to the directory containing lyx.exe 'c:\program files (x86)\lyx 2.1\bin' on my machine.
8.3) executed lyx.exe
8.4) everything involving python calls failed - reconfigure (which uses configure.py), opening old documents (which uses lyx2lyx), etc.
8.5) exited lyx back to the command prompt
8.6) on the command line typed 'set pythonpath=' which clears the pythonpath.
8.7) on the command line typed 'set path=' which clears the path.
8.8) typed lyx.exe to reenter lyx
8.9) but the result was the same, sad.
- Now, second try: https://wiki.lyx.org/LyX/Troubleshooting
9.1)Uninstall LyX from your PC if you have used an installation folder whose name exists of seperate words like C:\Program Files.
9.2)Reinstall LyX and consider, that you use a folder whose name exists of just one word like C:\Lyx15
9.3)Start the Command Prompt in windows (Start -> All Programs -> Accessories -> Command Prompt)
9.4)Change directory to C:\ (type c:)
9.5)Type "c:/lyx15/python/python.exe c:/lyx15/resources/configure.py" in the Command Prompt and press "return"
9.6)After the configuration has been finished you will find 4 files in the directory c:\ -> configure.log, lyxrc.defaults, textclass.lst and packages.lst. The browser could find the first two files, but not the latter two files. I kept going. (Maybe problems with lst format?)
9.7)Cut these 4 files and paste them into the \Username\Application Data\LyX folder. If a directory for Lyx does not exist create a new one.
But, to no avail.
10) I again deleted TeXLive, Lyx, and installed MikTex2.9, LyX. I did the above, but no improvement.
11) One comment in the old post suggests to the following:
Since you changed configuration to MiKTeX it may help to go back to basics. LyX looks for TeX at start-up & should reconfigure itself to suit so important we know how well set MiKTeX is. From any point on your system get cmd prompt type in> pdfLaTeX --version you should get a response of numbers confirming that LyX can do similar. If that step says like not an operable command then LyX wont know how to proceed. Also enter> Where /r \ pdfLaTeX which should confirm how many copies may be conflicting (check that it matches> Where $path:pdflatex ) the two should agree on one single copy.
12) Now, any suggestions would be appreciated. I came to the point that I don't understand why I'm doing it so hard.
I reinstalled Miktex and LyX in the C file to rule out any Korean characters and spaces in their addresses.
Here is the result:
The first two lines show that the two commands "where /r \ pdflatex" and "where $path:latex" give different results. The Korean in the second answer is:
정보: 제공된 패턴에 해당되는 파일을 찾지 못했습니다
==Information: no files corresponding to the given pattern is found.
Second, I typed "c:\lyx2.3\python\python.exe c:\lyx2.3\resources\configure.py," but the error "Remission denied: c:\configure.log," and there was no textclass in the last line.
I focused on any involvement in Korean characters and spaces, and did the same tests, I am not sure I've done right as the answer guides.
The two "where" matches:
C:\Users\장지웅>where /r \ pdflatex
Being aware of the changed directory name "LyX2.3," I did the action "c:\lyx15\python\python.exe c:\lyx15\resources\configure.py" with lyx15 replaced by lyx2.3. The result takes some time, which was new to me, but the two latter files of configure.log, lyxrc.defaults, textclass.lst and packages.lst are not found.
Here's the path.
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Cuminas\Document Express DjVu Plug-in\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Programs\Matlab\bin;C:\Lyx2.3\Perl\bin;C:\Users\장지웅\AppData\Local\Microsoft\WindowsApps;C:\Users\장지웅\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\;C:\Users\장지웅\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\;C:\MiKTeX2.9\miktex\bin\
Progress! Now no message that no textclass is found.
What I did first is to cut and paste textclass.lst and other files (from the past installation, I think) in the folder here and there. For example,
C:\Users\장지웅\AppData\Roaming C:\Lyx2.3\Resources C:\Windows\Application Data C:\Users\장지웅\AppData\Roaming
(장지웅 is my name.)
Then the shortcut in Desktop opens with no error message, the View (ctrl+R) button was not available, even though I opened newfile.
Second, I followed the instruction:
Traditionally it was easy to modify the start up icon however with windows 10 it is a bit more convoluted. So in the start menu find Lyx right click the LyX icon follow More to Open File Location which should take you to the user folder ....\Microsoft\Windows\Start Menu\Programs\LyX 2.3 now again right click the small LyX icon and select properties and you should see "Target" box has C:\LyX2.3\bin\LyX.exe this is where you need to paste the amended command e.g. C:\Lyx2.3\Lyx.exe -userdir C:\Lyx2.3\UserDir
There was a change. When I tried to open a newfile, the following message came up;
Then, I could press the View button, but LyX said
and in turn
After this message poped up, the Lyx ended automatically.
Third, I opened a new notepad and typed "C:\LyX2.3\UserDir" and saved it as startLyX.cmd on the desktop.
Fourth, I created a Temp folder at C:\Lyx2.3, and set the temporary directory as suggested, I could not see any change.