Rpy2 And Mac Os X 10.6
1
0
Entering edit mode
13.5 years ago
Science_Robot ★ 1.1k

I know there's already a question for 10.5 but I have 10.6 and a different error.

I have R 2.11.1 and Python 2.7 (Same error w/ 2.6):

R was installed with homebrew.

Any ideas?

Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/easy_install.py", line 1712, in main
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/easy_install.py", line 1716, in <lambda>
  File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/easy_install.py", line 211, in run
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/easy_install.py", line 446, in easy_install
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/easy_install.py", line 476, in install_item
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/easy_install.py", line 655, in install_eggs
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/easy_install.py", line 930, in build_and_install
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/easy_install.py", line 919, in run_setup
  File "build/bdist.macosx-10.4-i386/egg/setuptools/sandbox.py", line 62, in run_setup
  File "build/bdist.macosx-10.4-i386/egg/setuptools/sandbox.py", line 105, in run
  File "build/bdist.macosx-10.4-i386/egg/setuptools/sandbox.py", line 64, in <lambda>
  File "setup.py", line 372, in <module>
  File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/bdist_egg.py", line 167, in run
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/egg_info.py", line 177, in run
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/egg_info.py", line 252, in find_sources
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/egg_info.py", line 306, in run
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/egg_info.py", line 330, in add_defaults
  File "build/bdist.macosx-10.4-i386/egg/setuptools/command/sdist.py", line 203, in add_defaults
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "setup.py", line 111, in finalize_options
  File "setup.py", line 264, in get_rconfig
  File "setup.py", line 252, in from_string
ValueError: Invalid substring

in string
r • 3.6k views
ADD COMMENT
1
Entering edit mode
13.5 years ago
Science_Robot ★ 1.1k

As usual, I asked a question on Biostar and then came back 5 minutes later to answer it.

I commented out the lines producing the error in setup.py: 251-253

    #if not ok:
    #    raise ValueError('Invalid substring\n' + substring 
    #                     + '\nin string\n' + string)

Installation works, I ran the tests in rpy/robjects/tests and everything came out OK.

import rpy2 works as well.

But I have the feeling that something somewhere is deeply wrong.

ADD COMMENT
0
Entering edit mode

import rpy? Is this about rpy or rpy2? If rpy2, what is the version you are trying out?

Otherwise, you are commenting out a section that stops the install when something unexpected is happening. This seems to indicate that the homebrew R is built/installed not quite the way the script anticipates it.

ADD REPLY

Login before adding your answer.

Traffic: 2498 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6