Ask Your Question
1

MacOs 13.4 binary cant find sage.repl.utils module

asked 2023-07-21 04:47:33 +0100

vginhi gravatar image

updated 2023-08-13 10:08:37 +0100

FrédéricC gravatar image

Running macOS Ventura 13.4.1, Sage app from 3-manifolds project, Sage Version 10.0, includes Python 3.11.1.

Trying load command gives

ModuleNotFoundError: No module named 'sage.repl.utils'.

Last backtrace error message:

/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/repl/inputhook.py:45

Thanks for your help. Vince

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2023-07-23 15:28:32 +0100

Marc Culler gravatar image

updated 2023-07-23 16:13:32 +0100

This worked fine for me on macOS 13.4.1 with SageMath-10.0:

sage: t = tmp_filename(ext='.py')
sage: with open(t, 'w') as f:
....:     _ = f.write("print('hello world')")
....: 
sage: load(t)
hello world

So, more information would be needed to diagnose the problem. Please consider opening a github issue if you think this is really a bug.

One additional comment: I see that neither the current sage source code nor the SageMath 10.1 app contains a file named sage/repl/utils.py. So it is not surprising that python is not able to find that module. This makes me suspect that you have an older version of Sage somewhere on your system, and you have somehow configured your environment so that the python interpreter in SageMath 10.0 imports an old version of some module which expects to find the module sage.repl.utils.

edit flag offensive delete link more

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: 2023-07-21 04:47:33 +0100

Seen: 153 times

Last updated: Jul 23 '23