HarisIqbal88 / PlotNeuralNet

Latex code for making neural networks diagrams
MIT License
21.54k stars 2.83k forks source link

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

Open RandyChen233 opened 5 months ago

RandyChen233 commented 5 months ago

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

SamPrinceFranklin commented 4 months ago

Facing the same issue

SamPrinceFranklin commented 4 months ago

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.
RandyChen233 commented 4 months ago

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