# How do I import latex files into LyX?

I am new to LyX and trying to import the Latex file:

\documentclass{article}
\begin{document}
This is a Latex document.
\end{document}


I get the error

An error occurred while running tex2lyx2.3-f "TestLyx.tex" "TestLyx.lyx"

There was an earlier similar question that was solved by updating Lyx but I am using the latest version. This seems too simple for anything to go wrong but I must be doing something.

Cant really make it more mwe than that
I presume the file above was saved as TestLyx.tex and not in an unusual folder path.

Presumably in a documents folder under your user name, and that user name does NOT have accents spaces or other non-latin characters)

Lyx needs to be installed correctly such that using the tools check tex it confirms all is well with TeX.

You selected File Import LaTeX (plain) and it should have shown as

The message as shown should be Importing .......tex2lyx -f "TextLyx.tex" "TextLyx.lyx"

NOTE you either have a typo or there is something drastically wrong since there should be a space between tex2lyx and -f

Use view messages pane to check there is a space if no space you need to consult Lyx support
Proceeding on the basis it's a typo within your question and there is a space, then why do you get
An error occurred …

The most likely culprits are
1) something bad in the tex file, unlikely but not impossible so ensure it is a very simple cut and past file (as I did with notepad)
>where $path:tex2lyx >where /r \ tex2lyx  Confirm both are exactly the same answer especially the path before tex2lyx Tell us what those paths are (just the once) However I can tell you even after a week of trying hangul characters may not work and had to resort to a fresh user account. • Uninstalling and re-installing LyX solved the problem. May 3 '19 at 15:10 • I guess you can thus pass the basic ""where"" tests to avoid any other related lyx path problems – user170109 May 3 '19 at 15:13 • Import is working but using the "where" commands gave me C:\Users\jwrudn>where$path:tex2lyx INFO: Could not find files for the given pattern(s) C:\Users\jwrudn>where /r \ tex2lyx C:\Program Files (x86)\LyX 2.3\bin\tex2lyx.exe Do you have a suggestion? May 4 '19 at 16:09
• yes lyx has not been configured such that its binary folder C:\Program Files (x86)\LyX 2.3\bin is available to system users. Not a big deal if its working for you, however that folder may need to be added to the "system path" for associated apps to work with the contents