Ubuntu 22.04, Sage 10.3.beta0: Cannot import sage.all; caanot test due to libflint

111 views
Skip to first unread message

Jing Guo

unread,
Dec 7, 2023, 9:29:31 AM12/7/23
to sage-devel
Dear all,

I have been developing on sage 10.2.rc0, i.e., the latest version prior to 10.3.beta0. I am developing on CoCalc with Ubuntu 22.04.

Since some functions that I helped contribute were recently merged into 10.3.beta0, so I want to develop on this version. However, after I run `./sage -br`, it would say that "Warning: sage.all is not available; this is a limited REPL", see below:

[sagelib-10.3.beta0]     Installed /home/user/github/sage/src
[sagelib-10.3.beta0] Successfully installed sagemath-standard-10.3b0
[sagelib-10.3.beta0]
[sagelib-10.3.beta0] real       0m40.993s
[sagelib-10.3.beta0] user       0m20.073s
[sagelib-10.3.beta0] sys        0m7.142s

real    0m44.150s
user    0m20.326s
sys     0m7.398s
Sage build/upgrade complete!
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.3.beta0, Release Date: 2023-12-05              │
│ Using Python 3.10.12. Type "help()" for help.                      │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┃ Warning: sage.all is not available; this is a limited REPL.        ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
WARNING: your terminal doesn't support cursor position requests (CPR).
sage: 1 + 2 + 3
6
sage: quit

Problem 2: I am trying to implement something related to graph homomorphism counting, and it seems to say that I have something wrong with libflint?

~/github/sage$ ./sage -t src/sage/graphs/hom_count.py
too few successful tests, not using stored timings
Running doctests with ID 2023-12-07-14-23-43-1aa9ccc1.
Git branch: hom-count
Git ref: 10.3.beta0-28-g3eb4878d7a
Running with SAGE_LOCAL='/home/user/github/sage/local' and SAGE_VENV='/home/user/github/sage/local/var/lib/sage/venv-python3.10'
Using --optional=debian,pip,sage,sage_spkg,tdlib
Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,cvxopt,cvxopt,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_cubic_hecke,database_jones_numfield,database_knotinfo,dvipng,fpylll,fricas,gap_package_atlasrep,gap_package_design,gap_package_grape,gap_package_guava,gap_package_hap,gap_package_polycyclic,gap_package_qpa,gap_package_quagroup,gfan,graphviz,imagemagick,ipython,jupymake,kenzo,latte_int,lrcalc_python,lrslib,mcqd,meataxe,mpmath,msolve,nauty,networkx,numpy,palp,pandoc,pdf2svg,pdftocairo,pexpect,phitigra,pillow,plantri,polytopes_db,polytopes_db_4d,pplpy,primecountpy,ptyprocess,pynormaliz,pyparsing,python_igraph,requests,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.libs.ecl,sage.libs.flint,sage.libs.gap,sage.libs.linbox,sage.libs.m4ri,sage.libs.ntl,sage.libs.pari,sage.libs.singular,sage.misc.cython,sage.modular,sage.modules,sage.numerical.mip,sage.plot,sage.rings.complex_double,sage.rings.finite_rings,sage.rings.function_field,sage.rings.number_field,sage.rings.padics,sage.rings.polynomial.pbori,sage.rings.real_double,sage.rings.real_mpfr,sage.sat,sage.schemes,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,scipy,singular,sphinx,sympy,tdlib
Doctesting 1 file.
Traceback (most recent call last):
  File "/home/user/github/sage/src/bin/sage-runtests", line 162, in <module>
    err = DC.run()
  File "/home/user/github/sage/src/sage/doctest/control.py", line 1540, in run
    self.run_doctests()
  File "/home/user/github/sage/src/sage/doctest/control.py", line 1147, in run_doctests
    self.dispatcher = DocTestDispatcher(self)
  File "/home/user/github/sage/src/sage/doctest/forker.py", line 1690, in __init__
    init_sage(controller)
  File "/home/user/github/sage/src/sage/doctest/forker.py", line 207, in init_sage
    controller.load_environment()
  File "/home/user/github/sage/src/sage/doctest/control.py", line 678, in load_environment
    return import_module(self.options.environment)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/user/github/sage/src/sage/repl/ipython_kernel/all_jupyter.py", line 5, in <module>
    from sage.all_cmdline import *
  File "/home/user/github/sage/src/sage/all_cmdline.py", line 17, in <module>
    from sage.all import *
  File "/home/user/github/sage/src/sage/all.py", line 84, in <module>
    from sage.rings.all      import *
  File "/home/user/github/sage/src/sage/rings/all.py", line 55, in <module>
    from sage.rings.number_field.all import *
  File "/home/user/github/sage/src/sage/rings/number_field/all.py", line 2, in <module>
    from .number_field import (NumberField, NumberFieldTower, CyclotomicField, QuadraticField,
  File "/home/user/github/sage/src/sage/rings/number_field/number_field.py", line 120, in <module>
    import sage.rings.real_mpfi
  File "sage/rings/real_mpfi.pyx", line 1, in init sage.rings.real_mpfi
    r"""
  File "sage/rings/convert/mpfi.pyx", line 1, in init sage.rings.convert.mpfi
    """
ImportError: libflint.so.17: cannot open shared object file: No such file or directory

Thank you for your time.

Jing

Jing Guo

unread,
Dec 8, 2023, 12:20:03 PM12/8/23
to sage-devel
Issue was resolved. I ran

make doc-uninstall
make doc-clean
make sagelib-clean sagelib-uninstall
make

I also manually removed it and it was rebuilt later.
Reply all
Reply to author
Forward
0 new messages