# How can I install a Sage package on Sage Cloud?

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?

It is possible to install Python packages easily: https://github.com/sagemath/cloud/wiki/FAQ#-question-i-found-an-awesome-python-package-at-httpspypipythonorgpypi-and-i-want-to-use-it

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.)

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?

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...