PlotNeuralNet icon indicating copy to clipboard operation
PlotNeuralNet copied to clipboard

pdflatex not found even though MikTex is already installed (Windows)

Open Jushan-Randy-Chen opened this issue 1 year ago • 3 comments

Hi all,

I am getting this error when running the example:


../tikzmake.sh: line 5: pdflatex: command not found
rm: cannot remove '*.aux': No such file or directory
rm: cannot remove '*.log': No such file or directory
rm: cannot remove '*.vscodeLog': No such file or directory
../tikzmake.sh: line 13: xdg-open: command not found

I am not sure why this happens. I have installed MikTex and it is added to my path: image

Jushan-Randy-Chen avatar Feb 01 '24 17:02 Jushan-Randy-Chen

Facing the same issue

SamPrinceFranklin avatar Feb 14 '24 11:02 SamPrinceFranklin

Hi all,

I am getting this error when running the example:


../tikzmake.sh: line 5: pdflatex: command not found
rm: cannot remove '*.aux': No such file or directory
rm: cannot remove '*.log': No such file or directory
rm: cannot remove '*.vscodeLog': No such file or directory
../tikzmake.sh: line 13: xdg-open: command not found

I am not sure why this happens. I have installed MikTex and it is added to my path: image

The following method worked for me

Adding pdflatex to PATH on Windows

  1. Find the Path to pdflatex:

    • Open File Explorer.
    • Navigate to the directory where pdflatex is installed. By default, if you've installed LaTeX using MiKTeX, it might be located in C:\Program Files\MiKTeX<version>\miktex\bin or C:\Program Files (x86)\MiKTeX<version>\miktex\bin if you're using a 32-bit version.
  2. Add pdflatex to System Environment Variables:

    • Right-click on "This PC" or "My Computer" (depending on your Windows version) and select "Properties".
    • In the System window, click on "Advanced system settings" on the left panel.
    • In the System Properties window, click on the "Environment Variables" button at the bottom.
    • In the Environment Variables window, under the "System variables" section, find the "Path" variable and select it, then click on "Edit".
    • Click on "New" and add the path to the directory where pdflatex is located. Ensure each path in the list is separated by a semicolon (;).
    • Click "OK" to close each window.
  3. Verify Installation:

    • Open Command Prompt (search for "cmd" in the Start menu).
    • Type pdflatex --version and press Enter.
    • If pdflatex is correctly added to the PATH, you should see version information printed in the Command Prompt.

SamPrinceFranklin avatar Feb 14 '24 13:02 SamPrinceFranklin

Hi, thanks for the instructions! However, even though the pdflatex version info shows up when I type pdflatex --version in a command prompt, I'm still facing the same error

Jushan-Randy-Chen avatar Mar 05 '24 08:03 Jushan-Randy-Chen