Tx · LaTeX & TikZ

How to Fix “pdflatex Not Found” in TeXShop on El Capitan

Published By the 9to5Science editorial team

At a glance

  1. 1. Check for TeX

    TeXShop is an editor; confirm that a TeX distribution such as MacTeX or BasicTeX is installed.

  2. 2. Test the executable

    Use Terminal to check whether pdflatex is installed and find its location.

  3. 3. Set TeXShop’s path

    If Terminal finds pdflatex but TeXShop does not, add the TeX binary directory to TeXShop’s engine path.

  4. 4. Test a small file

    Restart TeXShop and compile a minimal document to verify the fix.

The message “pdflatex not found” usually means TeXShop cannot locate the LaTeX compiler, not that there is an error in your .tex file. TeXShop is an editor; it relies on a separate TeX distribution, such as MacTeX or BasicTeX, to provide pdflatex.

Use the checks below to determine whether the compiler is missing or whether TeXShop’s search path is wrong. Menu names and defaults can differ between TeXShop versions.

1. Check whether a TeX distribution is installed

Open Terminal and run:

command -v pdflatex

If the command prints a path, such as /Library/TeX/texbin/pdflatex, the executable is present. If it prints nothing, that only means it is not on Terminal’s current path. Try checking the common MacTeX location directly:

ls -l /Library/TeX/texbin/pdflatex

If the file is absent there, check any nonstandard location where you may have installed TeX. If pdflatex is absent from your installation, or no TeX distribution is installed, install one. For an older system such as OS X El Capitan, choose a MacTeX or BasicTeX release that supports that version of OS X; a current installer may require a newer macOS release. TeXShop alone is not enough to compile documents.

2. Test the compiler directly

If command -v returned a path, ask the compiler for its version. For the common MacTeX location, run:

/Library/TeX/texbin/pdflatex --version

A version banner means the program starts successfully. If your command -v result showed a different location, use that path instead. This separates a missing installation from a TeXShop configuration problem.

You can also test compilation independently of TeXShop by saving this as test.tex:

\documentclass{article}
\begin{document}
TeX is working.
\end{document}

In Terminal, move to the folder containing the file and run:

/Library/TeX/texbin/pdflatex test.tex

If pdflatex is at a different location, substitute its full path in this command. If this creates test.pdf, the compiler works and the problem is likely TeXShop’s configuration. If the command runs but reports a missing format file or another TeX error, that is a different problem from “pdflatex not found.”

3. Set TeXShop’s engine path

When Terminal can run pdflatex but TeXShop cannot, TeXShop may be using a search path that does not include the TeX binaries. In TeXShop, open Preferences and look in the Engine settings for Path settings or the equivalent field in your version. Add the directory containing pdflatex to the path.

For a standard MacTeX installation, the directory is commonly:

/Library/TeX/texbin

If the field expects a complete colon-separated path, a typical value is:

/Library/TeX/texbin:/usr/bin:/bin:/usr/sbin:/sbin

Keep any existing entries that your setup needs. Do not enter the path to the pdflatex file itself when the setting asks for a directory. Save the preference, quit TeXShop completely, reopen it, and try compiling again.

Some older MacTeX setups also have /usr/texbin as a link to the TeX binaries. Prefer the path that actually exists on your machine; the Terminal checks above will help you confirm it.

4. Check the selected engine

If TeXShop still fails, confirm that the document is being compiled with a standard pdflatex engine rather than a custom engine script that calls a nonexistent location. If you have edited engine files or TeXShop preferences, temporarily test with the default LaTeX engine settings. Also make sure you restarted TeXShop after changing the path: an already-running app may continue to use its previous settings.

Common mistakes

  • Installing TeXShop but not MacTeX or BasicTeX: the editor does not supply the compiler.
  • Assuming Terminal and TeXShop share the same path: graphical applications can have a different environment from an interactive shell.
  • Using a current TeX installer on an old OS: select a distribution release that supports El Capitan.
  • Treating every compilation error as a missing executable: once pdflatex starts, messages about packages, formats, or document syntax point to separate issues.

The key distinction is simple: if the executable is absent from your TeX installation, install a compatible distribution; if it runs in Terminal but not in TeXShop, correct TeXShop’s engine path or engine configuration.

References

  1. MacTeX
  2. TeXShop

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.