Although the location of babel
is on my system path — which is set in ~/.profile
— still Mathematica is not recognizing that:
Environment["PATH"]
/usr/bin:bin:/usr/sbin:/sbin
and hence your RunOpenBabel
function fails with the same error I listed. This is even after a system reboot.
The link you provide for changing the value of PATH
will probably lead to chaos on macOS, because if the file .bash_profile
exists, then .profile
will not even be read by the shell, and .profile
is where MacPorts and other apps place additions to PATH
(along with various command aliases).
What's even stranger is the following. In a new Mathematica session, before loading MoleculeViewer
, I evaluate the commands
SetEnvironment["PATH" -> StringJoin[Environment["PATH"], ":opt/local/bin"]]
Environment["PATH"]
and get output:
/usr/bin:/bin:/usr/sbin:/sbin:opt/local/bin
The last location there, /opt/local/bin
is definitely where the obabel
executable resides, as I can check with the Mac's system command:
mdfind -name obabel
And indeed, in a Terminal session I can evaluate, e.g., either of:
obabel -H
/opt/local/bin/obabel -H
and get the expected output.