can't install rpy2

Issue #114 on hold
Unknown created an issue

When I try to install Rpy2 (whether via easy_install or pip), I get errors (see below). I have a 64-bit Windows 7 machine running Python 2.7.

Phillip

C:\Phillip\Computer\Python\Install>pip install rpy2 Downloading/unpacking rpy2 Running setup.py egg_info for package rpy2

Traceback (most recent call last):
  File "<string>", line 16, in <module>
  File "c:\users\s117250\appdata\local\temp\1\pip-build\rpy2\setup.py", line 463, in <module>
    'rpy2': ['doc/source/rpy2_logo.png', ]}
  File "C:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "<string>", line 14, in replacement_run
  File "C:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 254, in find_sources
    mm.run()
  File "C:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 308, in run
    self.add_defaults()
  File "C:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 332, in add_defaults
    sdist.add_defaults(self)
  File "C:\Python27\lib\site-packages\setuptools\command\sdist.py", line 191, in add_defaults
    build_ext = self.get_finalized_command('build_ext')
  File "C:\Python27\lib\distutils\cmd.py", line 312, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "C:\Python27\lib\distutils\cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "c:\users\s117250\appdata\local\temp\1\pip-build\rpy2\setup.py", line 163, in finalize_options
    config += get_rconfig(r_home, about)
  File "c:\users\s117250\appdata\local\temp\1\pip-build\rpy2\setup.py", line 333, in get_rconfig
    rc = RConfig.from_string(rconfig, allow_empty = allow_empty)
  File "c:\users\s117250\appdata\local\temp\1\pip-build\rpy2\setup.py", line 293, in from_string
    + '\nin string\n' + string)
ValueError: Invalid substring

in string

Complete output from command python setup.py egg_info:
running egg_info

writing pip-egg-info\rpy2.egg-info\PKG-INFO

writing top-level names to pip-egg-info\rpy2.egg-info\top_level.txt

writing dependency_links to pip-egg-info\rpy2.egg-info\dependency_links.txt

warning: manifest_maker: standard file '-c' not found

Traceback (most recent call last):

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

File "c:\users\s117250\appdata\local\temp\1\pip-build\rpy2\setup.py", line 463, in <module>

'rpy2': ['doc/source/rpy2_logo.png', ]}

File "C:\Python27\lib\distutils\core.py", line 152, in setup

dist.run_commands()

File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands

self.run_command(cmd)

File "C:\Python27\lib\distutils\dist.py", line 972, in run_command

cmd_obj.run()

File "<string>", line 14, in replacement_run

File "C:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 254, in find_sources

mm.run()

File "C:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 308, in run

self.add_defaults()

File "C:\Python27\lib\site-packages\setuptools\command\egg_info.py", line 332, in add_defaults

sdist.add_defaults(self)

File "C:\Python27\lib\site-packages\setuptools\command\sdist.py", line 191, in add_defaults

build_ext = self.get_finalized_command('build_ext')

File "C:\Python27\lib\distutils\cmd.py", line 312, in get_finalized_command

cmd_obj.ensure_finalized()

File "C:\Python27\lib\distutils\cmd.py", line 109, in ensure_finalized

self.finalize_options()

File "c:\users\s117250\appdata\local\temp\1\pip-build\rpy2\setup.py", line 163, in finalize_options

config += get_rconfig(r_home, about)

File "c:\users\s117250\appdata\local\temp\1\pip-build\rpy2\setup.py", line 333, in get_rconfig

rc = RConfig.from_string(rconfig, allow_empty = allow_empty)

File "c:\users\s117250\appdata\local\temp\1\pip-build\rpy2\setup.py", line 293, in from_string

+ '\nin string\n' + string)

ValueError: Invalid substring

in string


Command python setup.py egg_info failed with error code 1 in c:\users\s117250\appdata\local\temp\1\pip-build\rpy2 Storing complete log in C:\Users\s117250\pip\pip.log

Comments (7)

  1. Laurent Gautier
    • changed status to open

    The script got an unexpected output when asking the R executable information about how R was configured/compiled. Windows support is much in DIY mode. If you contribute a patch, I'll include it.

  2. Unknown reporter

    (Reply via phil...@gmail.com):

    Hello Laurent,

    I've looked at the script, but can't figure out what's going on in the absence of documentation.

    I've fallen back on implementing the capability that I need (quantile regression) directly in Python, and it seems to be working.

    Phillip

    On Thu, Dec 27, 2012 at 6:16 AM, Laurent Gautier <issues-reply@bitbucket.org

    wrote:

  3. Laurent Gautier

    Ok. Thanks for letting me know; I'll close the issue for now then.

    If you ever come back to rpy2, the development version (future version 2.4.0) will report which one of the exact attempts at extracting information from the installed R has failed.

    (thinking of it, in your case it might be because you do not have the R-development tools installed).

  4. Don Oxley

    Laurent, I've been trying to install rpy2 on Win7 Pro/Python 3.2. I'm also getting failures which I've chased for quite a while, but eventually gave up. It does appear that the setup.py has not been upgraded from 2 to 3 as it still uses Popen... I tried to make the appropriate changes, though I'm not certain that I was successful.

    Are you aware of anyone who has successfully installed rpy2 on a Windows/Python3 system. I'd appreciate any pointers they/you might have. Otherwise, I think I'm going to have to give up and hope that 'progress' solves the problem.

    --Don

  5. Log in to comment