我正在尝试在我的计算机上安装 rpy2,但我无法做到。
我下载了源包,并尝试使用命令安装 Rpy2 (rpy2-2.3.2) python setup.py install
。这是结果:
running install
running build
running build_py
running build_ext
"C:\PROGRA~1\R\R-215~1.2\bin\R" CMD config --ldflags
"C:\PROGRA~1\R\R-215~1.2\bin\R" CMD config --cppflags
"C:\PROGRA~1\R\R-215~1.2\bin\R" CMD config LAPACK_LIBS
returned an empty string.
"C:\PROGRA~1\R\R-215~1.2\bin\R" CMD config BLAS_LIBS
returned an empty string.
Configuration for R as a library:
include_dirs: ('C:/PROGRA~1/R/R-215~1.2/include/i386', 'C:/PROGRA~1/R/R-215~1.2/include')
libraries: ('R',)
library_dirs: ('C:/PROGRA~1/R/R-215~1.2/bin/i386',)
extra_link_args: ()
# OSX-specific (included in extra_link_args)
framework_dirs: ()
framework: ()
building 'rpy2.rinterface._rinterface' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\rpy
creating build\temp.win32-2.7\Release\rpy\rinterface
C:\Rtools\gcc-4.6.3\bin\gcc.exe -mcygwin -mdll -O -Wall -DWin32=1 -I.\rpy\rinterface -IC:\Python27\include -IC:\Python27\PC -IC:/PROGRA~1/R/R-215~1.2/include/i386 -IC:/PROGRA~1/R/R-215~1.2/include -c .\rpy\rinterface\_interface.c -o build\temp.win32-2.7\Release\.\rpy\rinterface\_rinterface.o
cc1.exe: error: unrecognized command line option '-mcygwin'
error: command 'gcc' failed with exit status 1
我也尝试过成功build install
和easy_install
失败。我有 R 2.15.2、Python 2.7.2 和 Windows 7(32 位)。
我究竟做错了什么?
PS.如果我粘贴该命令,结果是:
cygwin警告:
MS-DOS style path detected C:\PROGRA~1\R\R-215~1.2\bin\config.sh
Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-215~1.2/bin/config.sh
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
-LC:/PROGRA~1/R/R-215~1.2/bin/i386 -lR