Install failed rpy2 2.5.4

Issue #255 resolved
Trung Nguyen created an issue

I tried to install rpy2 but failed. Here is the log. I'm novice to python.

c:\PYX\Scripts>pip install rpy2
Collecting rpy2
  Downloading rpy2-2.5.4.tar.gz (164kB)
    100% |################################| 167kB 190kB/s ta 0:00:01
    R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
    Copyright (C) 2014 The R Foundation for Statistical Computing
    Platform: i386-w64-mingw32/i386 (32-bit)
    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under the terms of the
    GNU General Public License versions 2 or 3.
    For more information about these matters see
    http://www.gnu.org/licenses/.
    'sh' is not recognized as an internal or external command,
    operable program or batch file.
    Z:\Programs\R\bin\R CMD config --ldflags
    c:\users\myexpe~1\appdata\local\temp\pip-build-kvttbb\rpy2\setup.py:187: UserWarning: R did not seem to have the minimum required version number
      warnings.warn("R did not seem to have the minimum required version number")
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "c:\users\myexpe~1\appdata\local\temp\pip-build-kvttbb\rpy2\setup.py", line 282, in <module>
        ri_ext = getRinterface_ext()
      File "c:\users\myexpe~1\appdata\local\temp\pip-build-kvttbb\rpy2\setup.py", line 189, in getRinterface_ext
        ldf = shlex.split(' '.join(rexec.cmd_config('--ldflags')))
      File "c:\users\myexpe~1\appdata\local\temp\pip-build-kvttbb\rpy2\setup.py", line 130, in cmd_config
        universal_newlines = True)
      File "C:\PYX\lib\subprocess.py", line 573, in check_output
        raise CalledProcessError(retcode, cmd, output=output)
    subprocess.CalledProcessError: Command '('Z:\\Programs\\R\\bin\\R', 'CMD', 'config', '--ldflags')' returned non-zero exit status 1
    Complete output from command python setup.py egg_info:
    R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"

    Copyright (C) 2014 The R Foundation for Statistical Computing

    Platform: i386-w64-mingw32/i386 (32-bit)



    R is free software and comes with ABSOLUTELY NO WARRANTY.

    You are welcome to redistribute it under the terms of the

    GNU General Public License versions 2 or 3.

    For more information about these matters see

    http://www.gnu.org/licenses/.



    'sh' is not recognized as an internal or external command,

    operable program or batch file.



    Z:\Programs\R\bin\R CMD config --ldflags

    c:\users\myexpe~1\appdata\local\temp\pip-build-kvttbb\rpy2\setup.py:187: UserWarning: R did not
seem to have the minimum required version number

      warnings.warn("R did not seem to have the minimum required version number")

    Traceback (most recent call last):

      File "<string>", line 20, in <module>

      File "c:\users\myexpe~1\appdata\local\temp\pip-build-kvttbb\rpy2\setup.py", line 282, in <modu
le>

        ri_ext = getRinterface_ext()

      File "c:\users\myexpe~1\appdata\local\temp\pip-build-kvttbb\rpy2\setup.py", line 189, in getRi
nterface_ext

        ldf = shlex.split(' '.join(rexec.cmd_config('--ldflags')))

      File "c:\users\myexpe~1\appdata\local\temp\pip-build-kvttbb\rpy2\setup.py", line 130, in cmd_c
onfig

        universal_newlines = True)

      File "C:\PYX\lib\subprocess.py", line 573, in check_output

        raise CalledProcessError(retcode, cmd, output=output)

    subprocess.CalledProcessError: Command '('Z:\\Programs\\R\\bin\\R', 'CMD', 'config', '--ldflags'
)' returned non-zero exit status 1

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in c:\users\myexpe~1\appdata\local\t
emp\pip-build-kvttbb\rpy2

Regards

Comments (12)

  1. Åsmund Hjulstad

    The error message complaining about 'sh' is produced by R, can be recreated like this:

      R CMD config --help
    

    Gives

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

    Building rpy2 from source will require a Dev environment, and with R this means the bundle known as Rtools.

  3. Åsmund Hjulstad

    OK. Still does not work, though. RExec.versionreturns [0,0]

    (BTW, this list cannot be passed as input to '.'.join(in finalize_options as it is not a list of strings)

    I am guessing the output from R stating version number is sent to stderr or something similar, as the output from check_output in the version property (line 123) is empty.

  4. Laurent Gautier

    There is no official windows support since rpy2 2.1.0 because of lack of resources.

    Whatever is (still) working is largely depending on contributions (pull request or patch).

  5. Laurent Gautier

    Different issue. You need R development tools, "sh" being one of them, and do not have them

  6. Log in to comment