Problem installing sage on Ubuntu.

54 views
Skip to first unread message

Maarten Derickx

unread,
Dec 25, 2021, 5:16:14 PM12/25/21
to sage-support
Hi all,

I tried installing sage on Ubuntu 18.04.6 LTS by downloading sage-9.4-Ubuntu_18.04-x86_64.tar.bz2 from one of the mirrors, unpacking the tar.bz2 file and then starting sage. However this results in a broken sage. Anyone any idea what is causing this?

Below is just one command that doesn't work, but there are multiple things causing similar stack traces.

┌────────────────────────────────────────────────────────────────────┐

│ SageMath version 9.4, Release Date: 2021-08-22                    

│ Using Python 3.9.5. Type "help()" for help.                       

└────────────────────────────────────────────────────────────────────┘

sage: M = ModularSymbols(79)                                                    

sage: S = M.cuspidal_submodule()                                                

---------------------------------------------------------------------------

KeyError                                  Traceback (most recent call last)

~/sages/SageMath/local/lib/python3.9/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7074)()

    838         try:

--> 839             return self.__cached_methods[name]

    840         except KeyError:


KeyError: '_ModularSymbolsAmbient__cuspidal_submodule'


During handling of the above exception, another exception occurred:


AttributeError                            Traceback (most recent call last)

~/sages/SageMath/local/lib/python3.9/site-packages/sage/modular/modsym/ambient.py in cuspidal_submodule(self)

   1398         try:

-> 1399             return self.__cuspidal_submodule

   1400         except AttributeError:


~/sages/SageMath/local/lib/python3.9/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.__getattr__ (build/cythonized/sage/structure/category_object.c:6993)()

    832         """

--> 833         return self.getattr_from_category(name)

    834 


~/sages/SageMath/local/lib/python3.9/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7159)()

    847 

--> 848             attr = getattr_from_other_class(self, cls, name)

    849             self.__cached_methods[name] = attr


~/sages/SageMath/local/lib/python3.9/site-packages/sage/cpython/getattr.pyx in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2551)()

    366         dummy_error_message.name = name

--> 367         raise AttributeError(dummy_error_message)

    368     cdef PyObject* attr = instance_getattr(cls, name)


AttributeError: 'MatrixSpace_with_category' object has no attribute '_cache__zero_matrix'


During handling of the above exception, another exception occurred:


SignalError                               Traceback (most recent call last)

<ipython-input-2-ba035e7f5442> in <module>

----> 1 S = M.cuspidal_submodule()


~/sages/SageMath/local/lib/python3.9/site-packages/sage/modular/modsym/ambient.py in cuspidal_submodule(self)

   1404             except AttributeError:

   1405                 pass

-> 1406             S = self.boundary_map().kernel()

   1407             S._set_is_cuspidal(True)

   1408             S._is_full_hecke_module = True


~/sages/SageMath/local/lib/python3.9/site-packages/sage/modules/matrix_morphism.py in kernel(self)

    714             []

    715         """

--> 716         V = self.matrix().kernel()

    717         D = self.domain()

    718         if not D.is_ambient():


~/sages/SageMath/local/lib/python3.9/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix.left_kernel (build/cythonized/sage/matrix/matrix2.c:31551)()

   4877 

   4878         tm = verbose("computing left kernel for %sx%s matrix" % (self.nrows(), self.ncols()),level=1)

-> 4879         K = self.transpose().right_kernel(*args, **kwds)

   4880         self.cache('left_kernel', K)

   4881         verbose("done computing left kernel for %sx%s matrix" % (self.nrows(), self.ncols()),level=1,t=tm)


~/sages/SageMath/local/lib/python3.9/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix.right_kernel (build/cythonized/sage/matrix/matrix2.c:31019)()

   4715 

   4716         # Go get the kernel matrix, this is where it all happens

-> 4717         M = self.right_kernel_matrix(*args, **kwds)

   4718 

   4719         ambient = R**self.ncols()


~/sages/SageMath/local/lib/python3.9/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix.right_kernel_matrix (build/cythonized/sage/matrix/matrix2.c:29656)()

   4316         if M is None:

   4317             try:

-> 4318                 format, M = self._right_kernel_matrix(algorithm=algorithm, proof=proof)

   4319             except AttributeError:

   4320                 pass


~/sages/SageMath/local/lib/python3.9/site-packages/sage/matrix/matrix_rational_sparse.pyx in sage.matrix.matrix_rational_sparse.Matrix_rational_sparse._right_kernel_matrix (build/cythonized/sage/matrix/matrix_rational_sparse.c:8888)()

    797             [0 0 1]

    798         """

--> 799         return self.dense_matrix()._right_kernel_matrix()

    800 

    801 


~/sages/SageMath/local/lib/python3.9/site-packages/sage/matrix/matrix_rational_dense.pyx in sage.matrix.matrix_rational_dense.Matrix_rational_dense._right_kernel_matrix (build/cythonized/sage/matrix/matrix_rational_dense.cpp:14103)()

   1424         else:

   1425             A, _ = self._clear_denom()

-> 1426             K = A._rational_kernel_iml().transpose().change_ring(QQ)

   1427         verbose("done computing right kernel matrix over the rationals for %sx%s matrix" % (self.nrows(), self.ncols()),level=1, t=tm)

   1428         return 'computed-iml-rational', K


~/sages/SageMath/local/lib/python3.9/site-packages/sage/matrix/matrix_integer_dense.pyx in sage.matrix.matrix_integer_dense.Matrix_integer_dense._rational_kernel_iml (build/cythonized/sage/matrix/matrix_integer_dense.cpp:32420)()

   3882         time = verbose('computing null space of %s x %s matrix using IML'%(self._nrows, self._ncols))

   3883         cdef mpz_t * m = fmpz_mat_to_mpz_array(self._matrix)

-> 3884         sig_on()

   3885         dim = nullspaceMP(self._nrows, self._ncols, m, &mp_N)

   3886         sig_off()


SignalError: Illegal instruction

slelievre

unread,
Dec 25, 2021, 5:23:19 PM12/25/21
to sage-support
Hi Maarten,

Binaries for Sage 9.3 and Sage 9.4 were prepared taking
advantage of too modern instruction sets not available
on older processors, so they only work with recent cpus.
The upcoming Sage 9.5 should work for everyone.

In the meantime, workarounds include

- build from source
- install via Conda
- build from source using prerequisites from Conda
- use Docker
- use SageCell
- use CoCalc

Good luck with your preferred solution.   --Samuel
Reply all
Reply to author
Forward
0 new messages