Report Ubuntu packaging bugs to Ubuntu On Wednesday, October 12, 2022 at 10:17:31 PM UTC-7 kun.j...@gmail.com wrote:
> Hi all, > > I'm trying to run sage on WSL2 (Ubuntu focal 20.04.5 LTS), and after a > fresh install (sadly only version 9.0), running `sage` gives the following > error. > > ModuleNotFoundError: No module named 'sage.cpython.string' > > I happen to know that the packages are installed > in /usr/lib/python3/dist-packages/, and sage/cpython/string.pyx is in there. > > What's particularly strange to me is that sage *can* find > `sage.misc.banner` (which is in the same dist-packages location). > Meanwhile, I can run `sage -python` and inspect `sys.path` manually (it has > the right dist-packages path in it), but importing sage.all in that context > fails with "ModuleNotFoundError: No module named 'cysignals.signals'" and > similar with other imports. > > ➜ ~ ls -l */usr/lib/python3/dist-packages/sage* > .rw-r--r-- 2.3k root 1 Jan 2020 __init__.py > drwxr-xr-x - root 12 Oct 20:34 __pycache__ > drwxr-xr-x - root 12 Oct 20:34 algebras > .rw-r--r-- 12k root 8 Feb 2020 all.py > <...snipped...> > ➜ ~ sage -python > Python 3.9.14 (main, Sep 7 2022, 23:43:29) > [GCC 9.4.0] on linux > >>> import sys > >>> print(sys.path) > ['', '/usr/lib/python39.zip', '/usr/lib/python3.9', > '/usr/lib/python3.9/lib-dynload', > '/home/j2kun/.local/lib/python3.9/site-packages', > '/usr/local/lib/python3.9/dist-packages', > *'/usr/lib/python3/dist-packages'*] > >>> import sage.all > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python3/dist-packages/sage/all.py", line 77, in <module> > from cysignals.signals import (AlarmInterrupt, SignalError, > File "/usr/lib/python3/dist-packages/cysignals/__init__.py", line 1, in > <module> > from .signals import AlarmInterrupt, SignalError, init_cysignals # > noqa > ModuleNotFoundError: No module named 'cysignals.signals'* (jkun's note: > it's there in** /usr/lib/python3/dist-packages/cysignals/)* > > I understand the recommendation is to use conda or build from source to > get a version > 9.2, but is there a quick fix I can do to link the > sage-python to these libraries? Maybe an existing trac issue I can read > through workarounds? The reason I ask is because I'm working on a library > that uses sage and it's a bit of a pain to fire up docker (and worse, the > sagemath docker image had known issues (only just now seeing > <https://trac.sagemath.org/ticket/34242#comment:21> that a new docker > image got pushed; still, working in docker is a bit inconvenient)) > > Any ideas? Further steps for investigation? > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/1545b076-f5f7-4a54-9959-1940e53e4b8dn%40googlegroups.com.