6

I am trying to find solution for my problem, so far not with success.

I am trying to install latest Rpy2 version on my computer. I already have all required programs (R 2.15.1 and 2.7 Python) installed. I am installing Rpy2 (rpy2-2.3.0) trough cmd with command

python setup.py build install

I am getting this traceback:

Traceback (most recent call last):

File "setup.py", line 441, in

[os.path.join('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 "c:\Python27\lib\distutils\command\install.py", line 563, in run

self.run_command('build')

File "c:\Python27\lib\distutils\cmd.py", line 326, in run_command

self.distribution.run_command(command)

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

cmd_obj.run()

File "c:\Python27\lib\distutils\command\build.py", line 127, in run

self.run_command(cmd_name)

File "c:\Python27\lib\distutils\cmd.py", line 326, in run_command

self.distribution.run_command(command)

File "c:\Python27\lib\distutils\dist.py", line 971, in run_command

cmd_obj.ensure_finalized()

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

self.finalize_options()

File "setup.py", line 152, in finalize_options

config += get_rconfig(r_home, about)

File "setup.py", line 312, in get_rconfig

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

File "setup.py", line 272, in from_string

  • '\nin string\n' + string)

ValueError: Invalid substring

in string

The same error I get when trying to install with

easy_install rpy2

UPDATE: now the same error shows on the other pc (64bit)

Thanks for help! :D

Domagoj
  • 1,674
  • 2
  • 16
  • 27

1 Answers1

6

Gave up on the rpy package. I will recommend PypeR package it is faster, easy to install (easy_install) and enjoyable to use! http://pypi.python.org/pypi/PypeR/

Hack-R
  • 22,422
  • 14
  • 75
  • 131
Domagoj
  • 1,674
  • 2
  • 16
  • 27
  • Hi, how is PypeR comparing to rpy2 now, for windows? (2017/08) – ZK Zhao Aug 03 '17 at 15:11
  • Hi, I've stuck with PypeR package and didn't used rpy2 at all, however PypeR should be inferior to rpy2 in terms of capabilities. Sheer simplicity of PypeR kept me away from more robust rpy2. Check this question out: https://stackoverflow.com/questions/5630441/how-do-rpy2-pyrserve-and-pyper-compare I think these packages did not changed much in last few years. Cheers. – Domagoj Aug 05 '17 at 19:28
  • 1
    Thanks. I just get rpy2 to run on Windows. It's actually not that hard. – ZK Zhao Aug 06 '17 at 01:56