Unable to install rPython for windows

395 views Asked by At

I have python 2.7.13 installed through Anaconda 2 and the latest version of R.

I followed the instruction on https://github.com/cjgb/rPython-win and I ran the following code:

    library(devtools)
    install("C:/Users/Yang Huang/Desktop/rPython")

And the following message appearred.

 library(devtools)
    > install("C:/Users/rPython")
    Installing rPython
    "C:/PROGRA~1/R/R-33~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL "C:/Users/rPython"  \
      --library="C:/Users/Yang Huang/Documents/R/win-library/3.3" --install-tests 

    * installing *source* package 'rPython' ...
    ** libs
    Warning: this package has a non-empty 'configure.win' file,
    so building only the main architecture

    c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o rPython.dll tmp.def pycall.o -LC:/Anaconda2/libs -lpython27 -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-33~1.3/bin/x64 -lR
    C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Anaconda2/libs/python27.lib when searching for -lpython27
    C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Anaconda2/libs/python27.lib when searching for -lpython27
    C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Anaconda2/libs\python27.lib when searching for -lpython27
    C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython27
    collect2.exe: error: ld returned 1 exit status
    no DLL was created
    ERROR: compilation failed for package 'rPython'
    * removing 'C:/Users/Yang Huang/Documents/R/win-library/3.3/rPython'
    Error: Command failed (1)

My configure.win is

#!/bin/sh

echo 'PKG_LIBS=-LC:/Anaconda2/libs -lpython27'  > src/makevars.win
echo 'PKG_CFLAGS=-I"C:/Anaconda2/include"'     >> src/makevars.win

Thanks for looking into this issue.

0

There are 0 answers