Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install rpy2 on Windows7 64bit for Python 2.7

I am trying to build and install rpy2 Python Module. But got an error (see below).

I have R installed in C:\Program Files\R\R-2.15.0\ and R.h is in C:\Program Files\R\R-2.15.0\include. How can I tell setup.py to find the R header in that directory?

Both Python and R were installed using official binary file for Windows 64bit.

Can someone contribute a rpy2 binary build for windows 64bit and Python2.7 64bit? Christoph Gohlke said for legal or technical reasons, rpy2 is not included in his Unofficial Windows Binaries for Python Extension Packages. Anyone else has a successful hit?

Thanks!

Given the following process:

$ python setup.py  build
running build
running build_py
running build_ext

returned an empty string. (5 times)

With this configuration for R as a library:

include_dirs: ()
libraries: ()
library_dirs: ('C:/PROGRA~1/R/R-215~1.0/bin/i386',)
extra_link_args: ()
 # OSX-specific (included in extra_link_args)
  framework_dirs: ()
  frameworks: ()

building 'rpy2.rinterface._rinterface' extension, using this command:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c 
/nologo /Ox /MD /W3 /GS- /DNDEBUG -DWin32=1 -DCSTACK_DEFNS=1 
-I.\rpy\rinterface -IC:\Python27\include -IC:\Python27\PC 
/Tc.\rpy\rinterface\_rinterface.c 
/Fobuild\temp.win-amd64-2.7\Release\.\rpy\rinterface\_rinterface.obj
_rinterface.c

gives this error:

.\rpy\rinterface\_rinterface.c(61) : fatal error C1083: Cannot open include file: 
'R.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe"' 
failed with exit status 2
like image 547
user1345198 Avatar asked Jun 22 '12 22:06

user1345198


1 Answers

Here's a link to the rpy2 Windows binaries, all Python versions and x86/x64:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2

like image 123
Amalgovinus Avatar answered Sep 28 '22 04:09

Amalgovinus