# Error: Could not start the command: pdflatex.exe -synctex=1 -interaction=nonstopmode “eigenvector or eigenvalue decompositions”.tex

I have a .tex file in the following path

C:\Users\sepideh\Desktop\dissertation\formulasInLatex\eigenvector or eigenvalue decompositions.tex

with the following content:

\documentclass[a4paper]{article}
\usepackage{amsmath}
\begin{document}
$T_3 = U_P\sum_P U_P^{-1}$
\end{document}


when I press the button Build & View in TexStudio

I get the error:

Error: Could not start the command: pdflatex.exe -synctex=1 -interaction=nonstopmode "eigenvector or eigenvalue decompositions".tex

I also had another file in the same path:

C:\Users\sepideh\Desktop\dissertation\formulasInLatex\wave covariance matrix.tex

with a PDF file associated to it. That was built almost a year ago with an earlier version of TexStudio (Currently I'm using TeXstudio 2.11.2 with MikTex 2.9)

C:\Users\sepideh\Desktop\dissertation\formulasInLatex\wave covariance matrix.pdf

Meaning that I'm sure that the syntax of the second file is correct because it was compiled successfully in the past.
But when I deleted the PDF file to compile and build it again, I encounterd the same error:

Error: Could not start the command: pdflatex.exe -synctex=1 -interaction=nonstopmode "wave covariance matrix".tex

Can anyone suggest me why the command pdflatex.exe couldn't start?

• Are you sure that your TeX system is working and being found correctly? Can you start the Command Prompt and try pdflatex --version, and edit in the response you get. – Joseph Wright Dec 13 '16 at 14:40
• Does TeXStudio know where to find pdflatex.exe? Look in its settings. – Pieter van Oostrum Dec 13 '16 at 15:16
• @PietvanOostrum Thanks, I had to manually set the paths to .exe files – Sepideh Abadpour Dec 13 '16 at 18:04

In order to solve this problem, I did the following:
From the menus at the top:

Options > Configure TexStudio...

Choose Commands at the right

and then manually enter the paths to .exe files by clicking on the below icon (select program) next to each line and then press OK.

I use TeXStudio with TeXLive and it works fine. Yesterday I was installing Julia, Atom, Juno, Anaconda and many other things and I also changed some paths in the environment variable of my computer. This caused my TeXStudio shows an exactly similar error as in the question here and also the question in the post in this link (click here).

This is the error I got:

Error: Could not start the command: pdflatex.exe -synctex=1 -interaction=nonstopmode "file name".tex

right click on my computer icon on the desktop -> choose advanced system settings ->