简体   繁体   中英

Usage of rpy2 with a custom installation of R

Dear fellow programmers, I would like to use R inside of a ipython notebook. On the system (Centos) I am working on exists an older version of R (2.15). I was able to execute R-code with this version in a ipython notebook, however, I need a newer version of R with extra packages and because I don't have administrative right for that machine, I have a local machine on which I installed the newest version of R (3.1.2). I compiled the source on my pc and flagged it in a way that it can be assessed by extensions. After that I installed rpy2 with pip and this installation went without any errors. I also can import the rpy2 package, but when I try to load libraries, I get an error message:

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/my/homedir/Software/R-3.1.2/library/stats/libs/stats.so':
  libRlapack.so: cannot open shared object file: No such file or directory
During startup - Warning message:
package \u2018stats\u2019 in options("defaultPackages") was not found 

I looked it up, all libraries are present and I don't get an error when I use R without ipython. Anyone has ideas?

Best, Daniel

Have you tried this? http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2 It's very weird when you say you need admin right to update R version because R usually doesn't require admin right to be installed. Make sure you install that under your user folder, instead of somewhere in the system drive.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM