You are not logged in.
Pages: 1
Hello,
does anyone here use Sage? What is your output if you enter the following command in Sage?
is_package_installed('type in some nonsense')Offline
What is your output? What do you expect it to be?
What sage package do you have installed? Does your package have a patch for this:
https://trac.sagemath.org/ticket/20377
mod note: definitely not a pacman issue. Not really sure if there is an issue at all. Moved to N.C.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
is_package_installed doesn't make sense for distro provided sagemath. Therefore it is patched to always return true, as otherwise it wouldn't be possible to use any optional package in Sage.
Offline
But then with this "patch" (always returning true) some functions don't work properly like the default Cremona mini database (because Sage wants to load the big one even in the case of not being installed) and other things that have this command in their source code (within if statements), too. Either one must change those occurring problems, too, or one arranges the package differently, so that Sage behaves properly as provided by the developer.
Last edited by Thrash (2017-06-12 20:56:25)
Offline
The only way for Sage to behave as intended by their developers is by compiling the Sage distribution from source or using their precompiled binaries. Sage simply does not support being compiled against system libraries - things are slightly improving lately, but there is still way to go. Until then, using the distro packages requires using some hacks and having to live with these quirks.
By having is_package_installed always return true, Sage will try to use whatever feature the optional package provides. If the package is not installed, you will generally get a python import error or some other message that will hopefully give you a hint on what you're missing. The Cremona database is a special case that would indeed need to be handled differently - will try to fix that for next release.
Offline
will try to fix that for next release.
Pleasant news, thanks!
by compiling the Sage distribution from source or using their precompiled binaries
What are the advantages and disadvantages of these methods compared to the Sage package by Arch?
Is it possible to install the full Cremona database using the Sage package by Arch?
Last edited by Thrash (2017-06-12 21:24:39)
Offline
As a temporary fix, replace "is_package_installed('database_cremona_ellcurve')" with "os.path.exists('/usr/share/sage/cremona/cremona.db')" in sage/databases/cremona.py
Offline
arojas wrote:by compiling the Sage distribution from source or using their precompiled binaries
What are the advantages and disadvantages of these methods compared to the Sage package by Arch?
Advantages: you get upstream support, some libraries are optimized for your CPU (if compiled from source), it's more widely tested.
Disadvantages: you have duplicated copies of many libraries on your system and on memory, which means higher memory and disk usage, you need to manage upgrades yourself.
Offline
Is it possible to install the full Cremona database using the Sage package by Arch?
Yes, it's in AUR
Offline
By the way, shouldn't it be replaced by "os.path.exists('/usr/share/cremona/cremona.db')"? Both my cremona_mini.db and cremona.db (now after I've installed the large database) are located there.
Another question: What does the dependency description "(make)" mean?
https://www.archlinux.org/packages/comm … /sagemath/
Last edited by Thrash (2017-06-12 22:12:50)
Offline
Offline
By the way, shouldn't it be replaced by "os.path.exists('/usr/share/cremona/cremona.db')"? Both my cremona_mini.db and cremona.db (now after I've installed the large database) are located there.
Right
Offline
Pages: 1