Ask Your Question
1

How allow renaming SageMath-x.y.app to SageMath.app for sagetex

asked 2020-06-14 16:51:53 +0100

murraye gravatar image

updated 2020-06-14 16:55:42 +0100

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 symlinks 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.?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-06-14 16:54:41 +0100

slelievre gravatar image

The app needs to be renamed before using it for the first time.

edit flag offensive delete link more

Comments

Aha! So does it suffice to just delete SageMath-9.1.app from /Applications and then reinstall, rename, and start the first time. Or are there some other files, say in ~/Library, that have to be deleted, too? (Without destroying previously made settings to recognize various kernels, e.g., Dyalog APL, J, Julia, R, Wolfram Language?)

murraye gravatar imagemurraye ( 2020-06-14 17:01:43 +0100 )edit

That works! Thank you.

murraye gravatar imagemurraye ( 2020-06-14 17:22:58 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-06-14 16:51:53 +0100

Seen: 267 times

Last updated: Jun 14 '20