Yes,
Here is the trace back
Traceback (most recent call last):
File "E:\Users\roe\Eclipse\workspace\Python\RPy\src\Faithful.py", line
8, in <module>
import rpy2.rpy_classic as rpy
File "C:\Python26\lib\site-packages\rpy2\rpy_classic.py", line 5, in
<module>
import rpy2.rinterface as ri
File "C:\Python26\lib\site-packages\rpy2\rinterface\__init__.py", line
56, in <module>
raise RuntimeError("Unable to locate R.dll within %s" % R_HOME)
RuntimeError: Unable to locate R.dll within C:\Program
Files\R\R-2.12.0\bin\i386\
Here is the modified content of my __init__.py file. I am assuming I
delete the .pyc file to force a new one to be generated.
# Load the R dll using the explicit path
# First try the bin dir:
Rlib = os.path.join(R_HOME, 'bin', 'R.dll')
# Try bin/i386 subdirectory seen in R 2.12.0 ## ADDED ##
if not os.path.exists(Rlib): ## ADDED ##
Rlib = os.path.join(R_HOME, 'bin', 'i386', 'R.dll') ## ADDED ##
# Then the lib dir:
if not os.path.exists(Rlib):
Rlib = os.path.join(R_HOME, 'lib', 'R.dll')
#Rlib = os.path.join(R_HOME, 'R.dll')
# Otherwise fail out!
if not os.path.exists(Rlib):
raise RuntimeError("Unable to locate R.dll within %s" % R_HOME)
win32api.LoadLibrary( Rlib )
Here are key items from my environment
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Co
mmon Files\Roxio
Shared\DLLShared\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:
\Documents and Settings\roe\Application
Data\Python\Scripts;C:\Python26\Scripts;
C:\Python26\;C:\MinGW\bin;C:\MinGW\msys\bin;C:\Program
Files\R\R-2.12.0\bin\i386
R_HOME=C:\Program Files\R\R-2.12.0\bin\i386\
Here is the location of my R.dll and .exe
C:\Program Files\R\R-2.12.0\bin\i386
John A. Schroeder
Idaho National Laboratory
Battelle Energy Alliance, LLC
P.O. Box 1625
Idaho Falls, ID 83415-3850
Ph: 208-526-8755
FAX: 208-526-2930
Peter <rpy-l...@maubp.freeserve.co.uk>
11/02/2010 09:48 AM
Please respond to
rpy-list@lists.sourceforge.net
To
"RPy help, support and design discussion list"
<rpy-list@lists.sourceforge.net>
cc
Subject
Re: [Rpy] rpy2 2.0.8 win32 Unable to locate R.dll
On Tue, Nov 2, 2010 at 3:15 PM, John Schroeder <john.schroe...@inl.gov>
wrote:
> Deschamps, Benjamin <Benjamin.Deschamps <at> AGR.GC.CA> writes:
>
> Has anyone solved this? I lost track of this thread, but now have the
same
> problem. The recommended solution (changes to rinterface\__init__.py)
does
> not work for me. The RPy2 error message I get refers to the proper
R.dll
> path. The rinterface init module throws the error message anyway. The
.dll
> allows all user full control so this should not be a file permission
problem
> with "os.path.exists"
So you tried my suggestions to add os.path.join(R_HOME, 'bin', 'i386',
'R.dll')
as a possible location for the DLL to rinterface\__init__.py
Could you post the full traceback?
Peter
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America
contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in
marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list