Ask Your Question

fylou's profile - activity

2019-08-11 12:09:43 +0100 received badge  Student (source)
2019-08-02 16:03:01 +0100 asked a question no module string in sage on Debian 10

When I launch sage on Debian 10, I obtain the following message

│ SageMath version 8.6, Release Date: 2019-01-15                     │
│ Using Python 2.7.16. 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/python2.7/dist-packages/sage/repl/", line 108, in <module>
    from sage.repl.preparse import preparse
  File "/usr/lib/python2.7/dist-packages/sage/repl/", line 227, in <module>
    from sage.repl.load import load_wrap
  File "/usr/lib/python2.7/dist-packages/sage/repl/", line 19, in <module>
    from sage.cpython.string import str_to_bytes, bytes_to_str, FS_ENCODING
ImportError: No module named string

Can you help me?


2019-07-31 08:21:50 +0100 commented question Where is defined __gmpq_cmp_z?

There is no site-packages directory (target directory of manually built python packages) and no dynamic library, ,like you on the computer.

2019-07-30 19:25:19 +0100 asked a question Where is defined __gmpq_cmp_z?

I got the following error after launching sage in Debian10.

----> 7 cdef class Integer(EuclideanDomainElement):
        global cdef = undefined
        global Integer = undefined
        global EuclideanDomainElement = undefined
      8     # This is really of type mpz_t, but we don't use the mpz_t typedef
      9     # to work around Cython bug
     11     cdef __mpz_struct value[1]
     13     cdef int _to_ZZ(self, ZZ_c *z) except -1
     14     cdef void set_from_mpz(self, mpz_t value)
     15     cdef hash_c(self)
     17     cpdef __pari__(self)
     19     cpdef _shift_helper(Integer self, y, int sign)
     20     cpdef _add_(self, other)
     21     cpdef _mul_(self, other)
     22     cpdef _pow_(self, other)
     23     cdef _and(Integer self, Integer other)
     24     cdef _or(Integer self, Integer other)
     25     cdef _xor(Integer self, Integer other)
     27     cpdef size_t _exact_log_log2_iter(self,Integer m)
     28     cpdef size_t _exact_log_mpfi_log(self,m)
     29     cpdef RingElement _valuation(Integer self, Integer p)
     30     cdef object _val_unit(Integer self, Integer p)
     31     cdef Integer _divide_knowing_divisible_by(Integer self, Integer right)

ImportError: /usr/lib/python2.7/dist-packages/sage/rings/ undefined symbol: __gmpq_cmp_z

Have you any idea to solve this error? Thank you.

2019-07-12 14:58:21 +0100 asked a question Convert existing notebook to Jupyter

Hi, I try to pass from sagenb to jupyter. I follow the recommandation on

When I run the command

sage -n export --list

I obtain the following error.

Traceback (most recent call last):
  File "/usr/bin/sage-notebook", line 266, in <module>
  File "/usr/bin/sage-notebook", line 135, in __init__
    os.execvp(SAGENB_EXPORT, [SAGENB_EXPORT] + argv)
  File "/usr/lib/python2.7/", line 346, in execvp
    _execvpe(file, args)
  File "/usr/lib/python2.7/", line 382, in _execvpe
    func(fullname, *argrest)
OSError: [Errno 2] No such file or directory

Thanks for your help