When using the sagetex
with LaTeX under MacTeX and the TeXShop front end, the suggested method (from the TeXShop docs) is to rename SageMath-x.y.app
to just SageMath.app
and then to create aliases for the executable sage
and for sagetex.sty
within the Contents of the app.
That works just fine to use sagetex
in LaTeX.
However, once the renaming is done, the app itself no longer works! Once I open the renamed SageMath.app, I get a pop-up error message "Juypyter Server failed to start...", and inspecting the log reveals:
/Applications/SageMath.app/Contents/Resources/sage/src/bin/sage: line 617: /Applications/SageMath-9.1.app/Contents/Resources/sage/local/bin/python3: No such file or directory
/Applications/SageMath.app/Contents/Resources/sage/src/bin/sage: line 617: exec: /Applications/SageMath-9.1.app/Contents/Resources/sage/local/bin/python3: cannot execute: No such file or directory
Apparently access to python3
has been hard-coded into the sage
executable so that it is expect to be in the file tree with root the original name SageMath-x.y
.
Is there some workaround so that one can both use sagetex
in the way recommended by the MacTeX/TeXShop world and still be able to use the SageMath app normally to start the Jupyter server, etc.?