Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
Best match: rpy2 2.2.6
Processing rpy2-2.2.6.tar.gz
Running rpy2-2.2.6/ -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/", line 1671, in main
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/", line 1659, in with_ei_usage
    return f()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/", line 1675, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/", line 152, in setup
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/", line 975, in run_commands
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/", line 995, in run_command
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/", 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/", 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/", 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/", 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/", 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/", line 919, in run_setup
    run_setup(setup_script, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/", line 27, in run_setup
    lambda: execfile(
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/", line 63, in run
    return func()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/", line 29, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "", line 462, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/", line 152, in setup
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/", line 975, in run_commands
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/", line 995, in run_command
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/", line 167, in run
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/", line 333, in run_command
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/", line 995, in run_command
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/", line 177, in run
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/", line 252, in find_sources
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/", line 306, in run
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/", line 330, in add_defaults
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/", line 300, in add_defaults
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/", line 319, in get_finalized_command
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/", line 117, in ensure_finalized
  File "", line 155, in finalize_options
  File "", line 319, in get_rconfig
  File "", 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.


share|improve this question
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 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

Your Answer


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.