[Tex/LaTex] Texmaker: command not found on MacOS El Capitan

mactextexmaker

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.

Best Answer

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.