On 08/10/10 19:36, pat flaherty wrote:

If I wanted I could maybe make a short research project out of why rpy2 2.2 doesn't work with Windows (perhaps particularly Windows 7) but I decided for the time being to get on with R.

The windows install kit (from sourceforge) for rpy2 2.0.8 installs into python 2.6.5 on my machine. In preliminary tests, Robjects has worked without problem.

However when I use Rinterface, I get the following problem with attribute baseenv:

d:\use>python
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import rpy2.rinterface as ri
>>> ri.initr()
0
>>> matrix = ri.baseenv["matrix"]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'baseenv'
>>> quit()

I imagine some notion of the R environments must be in there somewhere, but where, and under what name?

Did you consider browsing the documentation for the 2.0.x series ?
A link to it is conveniently located on the page of project about documentation:
http://rpy.sourceforge.net/rpy2_documentation.html


So this is rpy2 2.0.8 with python 2.6.5 on Windows 7 Ultimate 64 bit.

Surprising that you have something working with a 64bit windows. The build available on SourceForge was made with win32 (Windows XP).



Laurent


pat



On 10/7/2010 10:38 AM, pat flaherty wrote:

I fixed the link warnings temporarily by hand which makes clearer what the proximate error is:

d:\use\rpy2-2.1.5>cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWin32=1 -DCSTACK _DEFNS=1 -DRIF_HAS_RSIGHAND=1 -Irpy\rinterface -Id:\python26\include -Id:\python 26\PC -Id:/R/R-2.11.1/include /Tcrpy\rinterface\rinterface.c /Fobuild\temp.win3 2-2.6\Release\rpy\rinterface\rinterface.obj /link /LIBPATH:d:/R/R-2.11.1/bin R /
LIBPATH:d:/R/R-2.11.1/bin Rlapack /LIBPATH:d:/R/R-2.11.1/bin Rblas
rinterface.c
d:/R/R-2.11.1/include\R_ext/RS.h(43) : warning C4005: 'ERROR' : macro redefiniti
on
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\wingdi.h(104) : se
e previous definition of 'ERROR'
rpy\rinterface\rinterface.c(65) : fatal error C1083: Cannot open include file: '
Rinterface.h': No such file or directory

d:\use\rpy2-2.1.5>

Searching the web, it seems that Rinterface.h on Windows has a venerable history. One finds the file not in the normal R distribution but rather the R source and then it almost certainly needs modifications for Windows.

However back up. At many of the same places on the web it seems that what I want to use, to build rpy2 on Windows, is mingw - not msvc. Which I'll try. However, any advice is appreciated.

This person seems to have made some progress but then got stuck.

http://whatnicklife.blogspot.com/

pat


On 10/5/2010 4:20 PM, pat flaherty wrote:
Hi,

Windows 7 Ultimate 64 bit
VS 2008
R 2-11.1 (in PATH)
python 2.6.5

I get the same whether I download the kit and build with

    python setup.py install

or using easy_install (since the latter seems to simply invoke the former).

*error:*

d:\use\rpy2-2.1.5>python setup.py install
running install
running build
running build_py
running build_ext
building 'rpy2.rinterface.rinterface' extension
D:\WindowsPrograms\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWin32=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1 -Irpy\rinterfa ce -Id:\python26\include -Id:\python26\PC -Id:/R/R-2.11.1/include /Tcrpy\rinterf ace\rinterface.c /Fobuild\temp.win32-2.6\Release\rpy\rinterface\rinterface.obj - Ld:/R/R-2.11.1/bin -lR -Ld:/R/R-2.11.1/bin -lRlapack -Ld:/R/R-2.11.1/bin -lRblas

cl : Command line warning D9002 : ignoring unknown option '-Ld:/R/R-2.11.1/bin'
cl : Command line warning D9002 : ignoring unknown option '-lR'
cl : Command line warning D9002 : ignoring unknown option '-Ld:/R/R-2.11.1/bin'
cl : Command line warning D9002 : ignoring unknown option '-lRlapack'
cl : Command line warning D9002 : ignoring unknown option '-Ld:/R/R-2.11.1/bin'
cl : Command line warning D9002 : ignoring unknown option '-lRblas'
rinterface.c
d:/R/R-2.11.1/include\R_ext/RS.h(43) : warning C4005: 'ERROR' : macro redefiniti
on
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\wingdi.h(104) : se
e previous definition of 'ERROR'
rpy\rinterface\rinterface.c(65) : fatal error C1083: Cannot open include file: '
Rinterface.h': No such file or directory
error: command '"D:\WindowsPrograms\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"'
failed with exit status 2

d:\use\rpy2-2.1.5>


Seems to be something with the LINK options being malformed in the generated compile (cl.exe) command?

pat


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2&  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb


_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2&  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb


_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2&  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb


_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to