Hi,
According to
https://doc.sagemath.org/html/en/reference/spkg/rpy2.html#spkg-rpy2
the rpy2 package is a "standard package". However, I just checked
multiple builds in various places of sage-9.8 and also the latest
master branch, and rpy2 is not installed.
I can see why rpy2 isn't installed. It's because for sage-9.8 R was
deprecated from being a standard package to an optional package, and
of course there is no way to install rpy2 if a sufficiently library
usable R isn't installed.
1. What is the definition these days of a standard package? Is a
standard package "A package that might or might not be installed,
depending on what happens to be available when ./configure was run?"
A standard package used to be a package that was definitely installed
in every copy of Sage. It seems to me that these days there are three
types of packages:
- definitely installed in every copy of sage. An example is pari.
- there's an attempt to install them when sage gets built, if
conditions are right: an example is rpy2
- they are definitely not installed when sage is initially built:
example include various specialized databases.
2. A possible suggestion for improving the error messages. Just
doing "sage -i rpy2" doesn't work, because that complains that R isn't
installable:
[...]
[r-none] If the system package is installed, ./configure will check
whether it can be used.
[r-none]
[r-none]
[r-none] Error: r is a dummy package and
[r-none] cannot be installed using the Sage distribution.
OK, I realize I need to follow the directions above (about ubuntu),
and then I get r dev installed. I guess I know enough to
actually run ./configure again, and then I do "sage -i rpy2", and then
that does a LOT, e.g., spending hour(s) building gmp, mpfr, etc.
(why? because I ran ./configure?).
Why does it say "If the system package is installed, ./configure will
check whether it can be used."? This isn't
user friendly. It should say: "Ensure that the system R package is
installed, then run ./configure. After you do that, you can then
run 'sage -i rpy2'."
MOTIVATION: For every version of Sage up to and including 9.7, users
could use rpy2, which lots of little bits of sage evidently
now rely on,e g., "r.mean([3,7,9])". By deprecating the R
package entirely, thus making rpy2 into a sudo-standard package
in version 9.8, using the r interface is just broken, since it uses rpy2.
My guess is that rpy2 and all code that depends on R should be made
optional packages and marked #optional in the docs, etc.,
and it's just a bug that hasn't been done? Alternatively, we have to
make it so that building Sage depends on R being installed, or
we have to change the definition of "standard" package.
--
William (
http://wstein.org)