Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
705 views
in Technique[技术] by (71.8m points)

windows - 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 FilesRR-2.15.0 and R.h is in C:Program FilesRR-2.15.0include. 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.0VCBINamd64cl.exe /c 
/nologo /Ox /MD /W3 /GS- /DNDEBUG -DWin32=1 -DCSTACK_DEFNS=1 
-I.
py
interface -IC:Python27include -IC:Python27PC 
/Tc.
py
interface\_rinterface.c 
/Fobuildemp.win-amd64-2.7Release.
py
interface\_rinterface.obj
_rinterface.c

gives this error:

.
py
interface\_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.0VCBINamd64cl.exe"' 
failed with exit status 2
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...