I recently upgraded my Mac to El Capitan. After installing the new Version of MacTex, I changed all appearances of /usr/texbin in the texmaker settings to /Library/TeX/texbin/. Normal tex seems to work just fine, but tikzpictures with tikzexternal don't.

I added -shell-escape to the pdflatex command which worked fine before the upgrade to El Capitan. Now I get an error saying "sh: pdflatex: command not found" on the tikzpicture.

When I copy & paste the command from texmaker to the console (and insert the filename) it compiles without any problems.

After doing that, texmaker works fine until I change the tikzpicture (which should be because it doesn't try to recompile it when there are no changes made to it)

This is the error I get in texmaker:

 Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e
rror -interaction=batchmode -jobname "tikz/weak-scaling" "\def\tikzexternalreal
job{journal}\input{journal}"' did NOT result in a usable output file 'tikz/weak
-scaling' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have
enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes
it is also named 'write 18' or something like that. Or maybe the command simpl
y failed? Error messages can be found in 'tikz/weak-scaling.log'. If you contin
ue now, I'll try to typeset the picture.
See the tikz package documentation for explanation.


The error message says there would be more information in weak-scaling.log which doesn't exist.

• Welcome to TeX.SE. El captain update causes lot of problems due to PATH use modification. Perhaps other post since two days on the subject may help you ;-) – Romain Picot Oct 5 '15 at 13:34

I had a similar problem with texmaker on El Capitan yesterday which gave me a sh: repstopdf: command not found whenever I was trying to use a new eps graphic in my document. Apparently changing the specific paths to pdflatex etc. is not enough and it might still try looking for some binaries (when needed e.g. for converting images) in /usr/texbin.

I found a solution here which suggests using the input field at the bottom of the command settings tab to add /Library/TeX/texbin/ to the PATH variable. After that everything worked fine for me. I'm a bit surprised that it doesn't find pdflatex in your case though because you have probably specifically set its path to /Library/TeX/texbin/pdflatex, but I hope that this still solves your problem.

So my settings now look like this:

Note the active input box at the bottom which sets the PATH for the other binaries.

• I really thought I already tried that. But apparently something was different when I last tried it. It works now. Thanks a lot! – Dezi Oct 6 '15 at 11:08
• Dear both. Can you show us, how your lines looks like under "Preferences" and "Command build"? – A. F. Oct 6 '15 at 17:59
• I added a screenshot of my Command settings. I hope that helps. – Felix Oct 7 '15 at 17:15
• In my case, I had to set the path to '/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin/' – RoflcoptrException Oct 12 '15 at 12:54
• \$ ls /usr/texbin ls: /usr/texbin: No such file or directory – Mona Jalal Sep 12 '17 at 2:40

Please read the information about MacTeX and El Capitan at http://www.tug.org/mactex/elcapitan.html and, especially, the `Updating For El Capitan' document linked there. While MacTeX-2015 installs the necessary link it is possible to create that link if you read Section 8 of that document.

The most recent versions of the GUI applications supplied by MacTeX will (almost) auto-config to the change in link. I suspect many other apps (e.g., TeXmaker) have supplied updates that do the same.

I tried to change the directories, and it did not work. However, I delete Tex and Texmaker from the applications folder and download the most recent mactex (May 2015) and texmaker (Oct 2015) and install both again and now is working,