How can I install a Sage package on Sage Cloud?

asked 2014-10-02 14:16:20 +0200

Felix Breuer gravatar image

To install a sage package (e.g. the package "ore_algebra") from within a SMC project, I first tried running

install_package("ore_algebra")

but I got an error message that told me to do

sage -i ore_algebra

from the terminal instead. This I did and then got the error message

~$ sage -i ore_algebra
tee: /usr/local/sage/sage-6.3.beta6/logs/install.log: Permission denied
tee: /usr/local/sage/sage-6.3.beta6/logs/pkgs/ore_algebra.log: Permission denied
Attempting to download package ore_algebra
>>> Checking online list of optional packages.
[.]
>>> Found ore_algebra-0.1
Error: no write access to packages directory .

which is obvious since, I do not have write access to the global packages directory.

So the question becomes: How can I install Sage packages in the home directory of the current project on Sage Cloud?

edit retag flag offensive close merge delete

Comments

It is also possible to install Sage packages when installing a local copy of Sage in the project directory as explained here: https://github.com/sagemath/cloud/wiki/FAQ#-question-i-want-to-use-my-own-custom-built-from-source-copy-of-sage-takes-hours But is it necessary to install a local copy? Is there a simple way to use local packages with the system-wide Sage? (Making system-Python work with local/user packages works fine as explained in the above comment.)

Felix Breuer gravatar imageFelix Breuer ( 2014-10-02 21:01:31 +0200 )edit

Sage has no support for installing local packages with a system-wide Sage; in fact, in almost ten years I've never even heard a request for such a thing directly for sage before. Probably the reason is that until now, almost all sage users also installed their own copy of Sage. SMC changes this dynamic. In any case, I'll make ore_algebra available across all SMC projects in the system-wide Sage. I've installed it now. Does it work for you?

William Stein gravatar imageWilliam Stein ( 2014-10-05 16:30:27 +0200 )edit

I also never had cause to install a Sage package locally. That only came up in the context of Sage Cloud. Installing a whole local copy of Sage just for one tiny package seems too much, but maybe I'll just go that route in the future. Regarding ore_algebra: I think the installation went find, but I found out that ore_algebra is not compatible with Sage 6.3 yet. So I'll just use a local installation...

Felix Breuer gravatar imageFelix Breuer ( 2014-10-29 17:28:27 +0200 )edit