setup.py fails on Windows

Issue #20 resolved
Former user created an issue

Lines

{{{ include_dirs = get_rconfig(r_home, '--cppflags')[0].split() }}}

and

{{{ extra_link_args = get_rconfig(r_home, '--ldflags') +\ get_rconfig(r_home, 'LAPACK_LIBS', allow_empty=True) +\ get_rconfig(r_home, 'BLAS_LIBS')

}}}

fail on Windows XP using R 2.9.0 with the message

{{{ Exception: "c:\PROGRA~1\R\R-29~1.0\bin\R" CMD config --cppflags returned }}}

Comments (7)

  1. Laurent Gautier

    Calling R on the command line with the options CMD config --cppflags should return flags to be passed to the C compiler (location of R headers).

    The setup.py script stops whenever nothing (an empty string) is returned. Could you check what does the following return ?

    "c:\PROGRA1\R\R-291.0\bin\R" CMD config --cppflags

    The issue might have to do with your local install.

    Could also specify what is the version of rpy2 you are trying to compile ?

  2. Former user Account Deleted

    Hello,

    I have the same issue when trying to compile the latest version or RPy2 (2.1.3) on WIndows XP. I have R version 2.11.1.

    When I run the command that you suggested ("c:\PROGRA1\R\bin\R" CMD config --cppflags") The returned message is the following

    'sh' is not recognized as an internal or external command, operable program or batch file.

    Is there a workaround to this problem?

  3. Former user Account Deleted

    Yes, me too. I get the same exception as detailed by the OP and I also get the same result from running "R CMD config --cppflags": 'sh' is not recognized as an internal or external command, operable program or batch file.

  4. Former user Account Deleted

    Hi again; the last comment was from me.

    To help others install rpy2, I've been able to google a little further (difficult to google 'R', but...)

    The problem is more to do with a missing config tool from R than it has to do with rpy2 - specifically, sh.exe must be installed and in the path.

    1. Go to another discussion on this topic which references rtools: http://bitbucket.org/lgautier/rpy2/issue/20/setuppy-fails-on-windows

    2. Download rtools from: http://www.murdoch-sutherland.com/Rtools/

    3. Make sure your path variable is properly pointing to both sh in rtools and r.exe and you should be able to get a little further in installing rpy2. No guarantees though. Good luck.

  5. Log in to comment