Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm desperatly trying and retrying to install rpy2 on my Mac OS 10.6 in order to run SDA4PP plugin on QGIS. My version of R is 2.14.0 and it was obviously compiled with the option --enable-R-shlib since, as I read on a forum, all files in /library/Frameworks/R.framework/Libraries/ share the extension ".dylib". When I run easy_install rpy2 on the Terminal, here is what I get:

Searching for rpy2
Reading http://pypi.python.org/simple/rpy2/
Reading http://rpy.sourceforge.net
Best match: rpy2 2.2.6
Downloading http://pypi.python.org/packages/source/r/rpy2/rpy2-2.2.6.tar.gz#md5=32d73a3e4acb915ce15d958c9092dcb8
Processing rpy2-2.2.6.tar.gz
Running rpy2-2.2.6/setup.py -q bdist_egg --dist-dir /var/folders/5L/5Li0yCI7EqmkqJ+Ra--M9U+++TI/-Tmp-/easy_install-71n22e/rpy2-2.2.6/egg-dist-tmp-s83lG5
/Library/Frameworks/R.framework/Resources/bin/config: line 142: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 143: make: command not found
R was not built as a library
Traceback (most recent call last):
  File "/usr/bin/easy_install-2.6", line 10, in <module>
    load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/easy_install.py", line 1671, in main
    with_ei_usage(lambda:
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/easy_install.py", line 1659, in with_ei_usage
    return f()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/easy_install.py", line 1675, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/easy_install.py", line 211, in run
    self.easy_install(spec, not self.no_deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/easy_install.py", line 446, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/easy_install.py", line 476, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/easy_install.py", line 655, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/easy_install.py", line 930, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/easy_install.py", line 919, in run_setup
    run_setup(setup_script, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/sandbox.py", line 27, in run_setup
    lambda: execfile(
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/sandbox.py", line 63, in run
    return func()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/sandbox.py", line 29, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 462, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/bdist_egg.py", line 167, in run
    self.run_command("egg_info")
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 177, in run
    self.find_sources()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 252, in find_sources
    mm.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 306, in run
    self.add_defaults()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 330, in add_defaults
    sdist.add_defaults(self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/sdist.py", line 300, in add_defaults
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 319, in get_finalized_command
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 117, in ensure_finalized
  File "setup.py", line 155, in finalize_options
  File "setup.py", line 319, in get_rconfig
  File "setup.py", line 279, in from_string
ValueError: Invalid substring

in string

It says hat R was not built as a library but seems to continue anyway. What does that mean ? What should I do ?

Thanks for your help.

stan

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

The root of the problem seems to hinted at by:

/Library/Frameworks/R.framework/Resources/bin/config: line 142: make: command not found

You need developers tools (make, gcc, etc...). On OS X you need to register on the Apple site in order to be able to download and install them, AFAIR.

share|improve this answer
    
Thanks! I've installed Xcode3 and tryed again. This time I could read a long list of warnings starting with warning: no previously-included files matching 'patch' found anywhere in distribution; ending with ./rpy/rinterface/_rinterface.c: In function ‘EmbeddedR_ChooseFile’: ./rpy/rinterface/_rinterface.c:646: warning: ‘gstate’ may be used uninitialized in this function lipo: can't open input file: /var/folders/5L/5Li0yCI7EqmkqJ+Ra--M9U+++TI/-Tmp-//ccQiCvrB.out (No such file or directory) error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1. Any idea? –  Stanislas Rebaudet Jul 11 '12 at 12:11
    
Got a similar result installing manually rpy2-2.2.6.tar.gz through python setup.py install. I'm looking for a .dmg file... –  Stanislas Rebaudet Jul 11 '12 at 12:21
    
It might be that the latest OS X releases are compiling for LLVM (and the code base is giving it trouble). Someone else with a similar problem here ? May be worth bumping the question onto the rpy mailing-list ? –  lgautier Jul 11 '12 at 15:26
    
I've just posted the problem on rpy-list. Thanks –  Stanislas Rebaudet Jul 11 '12 at 18:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.