On Mon, Feb 16, 2009 at 2:20 PM, Fadhel benatig <fadhel.ben_a...@gmx.de> wrote:
>
> Hi all,
>
> I wrote a python-com program to be used within an Excel application.
> This module uses the rpy functionalities! When I run the com-object
> from a VBA function or procedure, I get the RuntimeError("Couldn't
> execute the R interpreter R.exe") raised in the module rpy_tools.py.
> After a simple debugging, I found that the problem lies in the function
>
> " def get_R_VERSION(RHOME=None, force_exec=False): "
>
> at line 64.

Have you tried just importing rpy at the python prompt (without using
Excel)?  I suspect it will fail in the same way - but maybe via Excel
the environment variables are different.

rpy (i.e. rpy1) first tries the RHOME environment variable.
It then falls back on the registry (which requires extra modules to be
installed)
It then tries to run R directly, hoping it is on the path.

If you want to use this without changing the code try:
* Defining the RHOME environment variable
* Installing win32 http://starship.python.net/crew/mhammond/win32/ so
the registry can be checked
* Making sure R is on the PATH (another environment variable)

Peter

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to