TeXstudio Compile: Error: Could not start the command: pdflatex.exe

I tried following the advice given here but nothing worked, even reinstalling TexStudio and Mactex didn't work. I had to go to:

TexStudio -> Options -> Restore default settings ...

Seems like a reinstall kept some preferences that I had corrupted.


Check if the configuration is correct and that TexStudio points to the program binaries.

Wtih Windows PC: Options> Configure TeXstudio, select Build, option Default Compiler.

With OSX: texStudio > Preferences, select Build, option Default Compiler.

screenshot for OSX

As for your question about the best editor, there is a Comparison of TeX editors documented on Wikipedia, which may be of use to you.


Another reason for getting this error with TexStudio (which is a wonderful IDE IMHO), is that it is really trying to tell you that the .tex file does not exist. This can happen, for example, when the wrong file has been chosen as the Master document. Check the error message to see that the file it mentions is the correct master. e.g.

pdflatex.exe -synctex=1 -interaction=nonstopmode "wrongfile".tex

or

pdflatex.exe -synctex=1 -interaction=nonstopmode "rightfile"."wrongextension"