On Mon, Feb 23, 2009 at 7:57 PM, Isaac Grenfell <igrenf...@gmail.com> wrote:
> Hello, I am having difficulty using rpy2  to load the RandomFields library.
> What is perplexing is that the MASS and spatial libraries both load, but
> when I try to load RandomFields, I get the following error message:
>
> Error in inDL(x, as.logical(local), as.logical(now), ...) :
>   unable to load shared library
> 'C:/Workspace/R-2.8.1/library/RandomFields/libs/RandomFields.dll':
>   LoadLibrary failure:  The specified module could not be found.

Does this file exist on your machine?
C:\Workspace\R-2.8.1\library\RandomFields\libs\RandomFields.dll

> Error: package/namespace load failed for 'RandomFields'
>
> Here is the code snippet I am using:
>
> import rpy2
> import rpy2.robjects as robjects
> r = robjects.r
> r('library("MASS")')
> r('library("spatial")')
> r('library("RandomFields")')
>
> Per the rpy2 FAQ, Imade sure that the bin folder for R was included in the
> environment variable list, and I included the libs folder for RandomFields
> for good measure, and it still is not seeing the dll.  I am truly stumped by
> this.

I noticed in the error message that Unix style path separators are
being used (/) not Windows style (\).  This could be the cause of the
problem - looking back over the mailing list, about 30 November 2007
Gregory Warnes made a change as part of RPy 1.0.1 to deal with a
similar problem with loading the lapack library.  I had a quick look
in SVN but couldn't work out what he actually changed in the code.

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