I can't open SageMath Jupyer Notebook on Mac because Safari can't connect to the localhost server

asked 2022-12-14 19:28:28 +0200

alvaro41300 gravatar image

updated 2022-12-15 08:12:10 +0200

FrédéricC gravatar image

I have to use SageMath for my studies and I'm annoyed because I can't open it anymore. Before, I had a MacBook Pro with M1 and normally I just clicked "Jupyter notebook from folder" in my SageMath 9.7 application and then it used to open the Jupyter Notebook in the browser and it worked fine, but now on the new computer I get this error ( Safari can't open the page "localhost:8888/tree? token= .... "because it could not connect to server "localhost")

I've tried uninstalling and reinstalling SageMath 9.7 (I'm using a 2021 MacBook Pro with M1 Pro), restarted my computer, tried different browsers, checked my firewall and it still doesn't work.

What's happening? How do I fix it? It's very important since they demand it from me at the university.

edit retag flag offensive close merge delete

Comments

When you installed SageMath.app, did you also install Recommended_9_7.pkg? If so, try to open Jupyter from a console. To this end, open Terminal.app (usually at the Utilities folder inside the Applications folder), then type sage -n jupyter.

Juanjo gravatar imageJuanjo ( 2022-12-15 01:24:44 +0200 )edit

Yes, I have installed the recommended pack. Also, from the terminal it does allow me to start sagemath, but the problem is that from the application I can't start sagemath from a folder, as I did before.

alvaro41300 gravatar imagealvaro41300 ( 2022-12-15 09:15:37 +0200 )edit

Well, that's good news, since at least you have a workaround and can continue working with SageMath and Jupyter. Is the problem tied to Safari? What happens if a different browser is the default browser? Perhaps you could file an issue in the Github site of the app (see https://github.com/3-manifolds/Sage_macOS/issues).

Juanjo gravatar imageJuanjo ( 2022-12-16 00:04:26 +0200 )edit