[R] Rpy Import Error

Dirk Eddelbuettel edd at debian.org
Mon Oct 27 16:28:12 CET 2003


On Mon, Oct 27, 2003 at 06:57:08AM -0800, Brett Magill wrote:
> I am trying to install Rpy to test it out as an R
> interface for a project that I am working on. 
> However, I get the following error.  Any clues as to
> what might be going on? I have alo tried RSPython, but
> I gave up due to errors.  RSPython segfaults when
> started from R and gives an error message I can;t
> remember from python.  Thanks, Brett
> 
>  >>> import rpy
>   Traceback (most recent call last):
>     File "<stdin>", line 1, in ?
>     File "/usr/lib/python2.2/site-packages/rpy.py",
> line 24, in ?
>   import _rpy
>   ImportError:
> /usr/lib/python2.2/site-packages/_rpymodule.so: 
>       undefined symbol: jump_now
>   >>>

RPy has not been updated to keep up with changes in R.

--- rpy-0.3.1.orig/src/RPy.h
+++ rpy-0.3.1/src/RPy.h
@@ -90,7 +90,8 @@
 PyOS_sighandler_t python_sigint;
 
 /* R function for jumping to toplevel context */
-extern void jump_now(void);
+/* extern void jump_now(void); */
+extern void Rf_onintr(void); 
 
 /* Global interpreter */
 PyInterpreterState *my_interp;
--- rpy-0.3.1.orig/src/R_eval.c
+++ rpy-0.3.1/src/R_eval.c
@@ -65,7 +65,8 @@
 void interrupt_R(int signum)
 {
   interrupted = 1;
-  jump_now();
+  /* jump_now(); */
+  Rf_onintr();
 }
 
 

I have not tested this extensively, though.

Dirk

-- 
Those are my principles, and if you don't like them... well, I have others.
                                                -- Groucho Marx




More information about the R-help mailing list