Opened 4 years ago

Last modified 22 months ago

#25503 closed defect

Allow the use of system's R installation — at Version 5

Reported by: tmonteil Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords: R, sdl
Cc: charpent, embray, fbissey, kcrisman, slelievre, gh-timokau, mjo Merged in:
Authors: Thierry Monteil Reviewers:
Report Upstream: N/A Work issues:
Branch: u/tmonteil/allow_the_use_of_system_s_r_installation (Commits, GitHub, GitLab) Commit: eed2ea352af29fa6e6fb65d274c2e0078a7c07a6
Dependencies: Stopgaps:

Status badges

Description (last modified by slelievre)

The aim of this ticket is to allow Sage to use the system's R, instead of building its own.

It should work for:

  • sage -R command
  • Sage's r interface
  • Sage's rpy2 Python package
  • Sage's jupyter IRkernel

Similarly to the way one can decide to use the system ATLAS when building Sage, on the user side, building Sage so that it uses the system R is achieved by setting the SAGE_R_LIB environment variable.

To test this ticket, you should at least:

  • install R on your system (e.g. sudo apt install r-base)
  • reinstall r and rpy2 with SAGE_R_LIB set:
    export SAGE_R_LIB=/usr/lib/R/
    sage -f r
    sage -f rpy2
    make build
  • test Sage R command (this should/might show a different version than 3.4.4):
    sage -R
  • test Sage's R interface:
    sage -t --long src/sage/interfaces/
  • test rpy2:
    sage -t --long src/sage/stats/

Change History (5)

comment:1 Changed 4 years ago by tmonteil

  • Branch set to u/tmonteil/allow_the_use_of_system_s_r_installation

comment:2 Changed 4 years ago by tmonteil

  • Cc charpent embray added
  • Commit set to eed2ea352af29fa6e6fb65d274c2e0078a7c07a6
  • Description modified (diff)
  • Status changed from new to needs_review

New commits:

380a2b0#25503 : do not build R if SAGE_R_LIB is set
e8768ed#25503 : let rpy2 use SAGE_R_LIB for its RHOMES variable
0519cda#25503 : fix issue between R interface and readline 7
eed2ea3#25503 : document the SAGE_R_LIB variable in the install guide

comment:3 Changed 4 years ago by tmonteil

  • Description modified (diff)

comment:4 Changed 4 years ago by tmonteil

We should probably also update sage-env script, which explicitly unset R-related variables that the user could set in relation with system-wide install.

comment:5 Changed 4 years ago by slelievre

  • Cc fbissey kcrisman slelievre added
  • Description modified (diff)
  • Keywords R added
Note: See TracTickets for help on using tickets.