Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sagemath: ModuleNotFoundError #54514

Open
Eloitor opened this issue Feb 27, 2025 · 15 comments
Open

Sagemath: ModuleNotFoundError #54514

Eloitor opened this issue Feb 27, 2025 · 15 comments
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed

Comments

@Eloitor
Copy link
Contributor

Eloitor commented Feb 27, 2025

Is this a new report?

Yes

System Info

Void 6.6.37_1 x86_64 GenuineIntel uptodate rrmFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

Package(s) Affected

sagemath-10.5_2

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

Sagemath can run *.sage files

Actual behaviour

Sagemath crashes.

eloi@void ~/test> cat example.sage
print(42)
eloi@void ~/test> sage example.sage
Traceback (most recent call last):
  File "/home/eloi/test/example.sage.py", line 4, in <module>
    from sage.all_cmdline import *   # import sage library
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sage'

Steps to reproduce

  1. create a *.sage file and enter some sage code.
  2. run it with sage.
@Eloitor Eloitor added bug Something isn't working needs-testing Testing a PR or reproducing an issue needed labels Feb 27, 2025
@dkwo
Copy link
Contributor

dkwo commented Feb 27, 2025

It's working fine for me. Any custom stuff?

@classabbyamp
Copy link
Member

classabbyamp commented Feb 27, 2025

which sage? env | grep VIRTUAL?

@Eloitor
Copy link
Contributor Author

Eloitor commented Feb 27, 2025

$ which sage
/usr/bin/sage

env | grep VIRTUAL returns nothing

@Eloitor
Copy link
Contributor Author

Eloitor commented Feb 28, 2025

I can reproduce this bug in 2 different computers with void.

@dkwo
Copy link
Contributor

dkwo commented Feb 28, 2025

What if you try as a new user? does xbps-pkgdb -a report anything? if you xbps-install -f sagemath, do you see any warnings?

@Eloitor
Copy link
Contributor Author

Eloitor commented Feb 28, 2025

sudo sage example.sage works, but su and then sage example.sage gives the same error.

When reinstalling I get

...
sagemath-10.5_2: removed obsolete entry: ./usr/libexec/sagemath/sage-venv-confi
[*] Configuring unpacked packages
sagemath-10.5_2: configuring ...
Byte-compiling python3.13 code for module sage...
Updating ldconfig(8) cache...
sagemath-10.5_2: installed successfully.

but it still fails to run .sage files

@Eloitor
Copy link
Contributor Author

Eloitor commented Feb 28, 2025

this might be related: https://ask.sagemath.org/question/78786/modulenotfounderror-no-module-named-sage/?answer=78829#post-id-78829

I tried sage -python example.sage and it worked

@dkwo
Copy link
Contributor

dkwo commented Feb 28, 2025

if you create a new user (as in useradd...), and run sage as that user, does it work?

What is output of xpkg -L?

@Eloitor
Copy link
Contributor Author

Eloitor commented Mar 1, 2025

I created a new user called new I placed an example.sage file in its home directory and I get the same error.

PyInstaller
ansifilter
bavarder
binocle
briss
chatblade
dooble
ezcrypt
factor
fancy-cat
fswatch
geopard
hydrus
kanata
latexencode
lesspass-client
libfswatch
lisgd
lyx
pdf.tocgen
play-timer
pmbootstrap
poedit
posting
pyinstaller-hooks-contrib
python3-bounded-pool-executor
python3-click-default-group
python3-datasheet
python3-debugpy
python3-importlib_resources
python3-jiter
python3-openai
python3-pqdm
python3-pymdown-extensions
python3-tiktoken
rockpass
src
typstfmt
wvkbd
yek

@dkwo
Copy link
Contributor

dkwo commented Mar 1, 2025 via email

@Eloitor
Copy link
Contributor Author

Eloitor commented Mar 1, 2025

I removed all of them, and the error persists.

@dkwo
Copy link
Contributor

dkwo commented Mar 1, 2025 via email

@Eloitor
Copy link
Contributor Author

Eloitor commented Mar 2, 2025

It doesn't report anything

@dkwo
Copy link
Contributor

dkwo commented Mar 2, 2025

I'm out of ideas for now, other than speculating this may be simlar to other isses you had before #46261 with sage and or jupyter. Perhaps try a fresh Void install?

@Eloitor
Copy link
Contributor Author

Eloitor commented Mar 2, 2025

Thanks for the patience. I'll do a reinstall if I don't find any other solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed
Projects
None yet
Development

No branches or pull requests

3 participants