Python3.11 Cpython issue, can't open app
I'm not a native speaker, sorry for poor English
I installed sagemath through sudo apt install sagemath
yesterday and tried to import sage.all
from python, however I was hit with
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/sage/all.py", line 83, in <module>
import sage.misc.lazy_import
ModuleNotFoundError: No module named 'sage.misc.lazy_import'
After a bit of work I found that .pyx files can't be imported, and import pyximport; pyximport.install()
works to mitigate that error, however I was hit with another error:
Traceback (most recent call last):
File "/home/wayne/.local/lib/python3.11/site-packages/pyximport/pyximport.py", line 216, in load_module
mod = imp.load_dynamic(name, so_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/imp.py", line 343, in load_dynamic
return _load(spec)
^^^^^^^^^^^
ImportError: /home/wayne/.pyxbld/lib.linux-x86_64-cpython-311/sage/misc/randstate.cpython-311-x86_64-linux- gnu.so: undefined symbol: __gmp_randclear
Which I suppose is still related to Cython, I wasn't able to resolve this.
When running sage
in terminal here's the output
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.0, Release Date: 2020-01-01 │
│ Using Python 3.11.1. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
File "/usr/share/sagemath/bin/sage-ipython", line 12, in <module>
from sage.repl.interpreter import SageTerminalApp
File "/usr/lib/python3/dist-packages/sage/repl/interpreter.py", line 105, in <module>
from sage.repl.preparse import preparse, containing_block
File "/usr/lib/python3/dist-packages/sage/repl/preparse.py", line 227, in <module>
from sage.repl.load import load_wrap
File "/usr/lib/python3/dist-packages/sage/repl/load.py", line 19, in <module>
from sage.cpython.string import str_to_bytes, bytes_to_str, FS_ENCODING
ModuleNotFoundError: No module named 'sage.cpython.string'
After this I tried to import sage.cpython.string
python
/home/wayne/.pyxbld/temp.linux-x86_64-cpython-311/pyrex/sage/cpython/string.c:744:10: fatal error: string_impl.h: No such file or directory
744 | #include "string_impl.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
I think these are all somehow related, I was not able to resolve them, any ideas are appreciated