Ask Your Question
1

MacOs 13.4 binary cant find sage.repl.utils module

asked 2 years ago

vginhi gravatar image

updated 1 year ago

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 2 years ago

Marc Culler gravatar image

updated 2 years ago

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.

Preview: (hide)
link

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: 2 years ago

Seen: 245 times

Last updated: Jul 23 '23