OSX 10.11 install linker error: "library not found for -licuuc"

Issue #333 new
Michael Fuller
created an issue

I am unable to install rpy2 (2.7.8) from source on a Mac.

OS version: 10.11.3 R version: 3.2.3 Python version: 2.7.10 (results are the same for python 3.4.3)

Output of "python setup.py install":

setup.py:29: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
  warnings.warn("R emitting a warning: %s" % r_home[0])
setup.py:130: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
  warnings.warn("R emitting a warning: %s" % rversion)
setup.py:155: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
  warnings.warn("R emitting a warning: %s" % output[0])
R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
/opt/local/Library/Frameworks/R.framework/Resources/bin/R CMD config --ldflags
/opt/local/Library/Frameworks/R.framework/Resources/bin/R CMD config --cppflags

    Compilation parameters for rpy2's C components:
        include_dirs    = ['/opt/local/Library/Frameworks/R.framework/Resources/include']
        library_dirs    = []
        libraries       = ['pcre', 'bz2', 'z', 'm', 'iconv', 'icuuc', 'icui18n']
        extra_link_args = ['-F/opt/local/Library/Frameworks/R.framework/..', '-framework', 'R']

running install
Checking .pth file support in /Library/Python/2.7/site-packages/
/usr/bin/python -E -c pass
TEST PASSED: /Library/Python/2.7/site-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing requirements to rpy2.egg-info/requires.txt
writing rpy2.egg-info/PKG-INFO
writing top-level names to rpy2.egg-info/top_level.txt
writing dependency_links to rpy2.egg-info/dependency_links.txt
R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
reading manifest file 'rpy2.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*patch*' found anywhere in distribution
warning: no previously-included files matching '*diff*' found anywhere in distribution
warning: no previously-included files matching '.hg' found anywhere in distribution
warning: no files found matching 'MANIFEST'
warning: no files found matching 'README'
warning: no files found matching 'MPL_LICENSE'
warning: no files found matching 'GPL_LICENSE'
warning: no files found matching 'LGPL_LICENSE'
no previously-included directories found matching 'dist'
warning: no files found matching 'doc/source/rpy2_logo.png'
writing manifest file 'rpy2.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.11-intel/egg
running build_clib
building 'r_utils' library
creating build/temp.macosx-10.11-intel-2.7
creating build/temp.macosx-10.11-intel-2.7/rpy
creating build/temp.macosx-10.11-intel-2.7/rpy/rinterface
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -I./rpy/rinterface -I/opt/local/Library/Frameworks/R.framework/Resources/include -c ./rpy/rinterface/r_utils.c -o build/temp.macosx-10.11-intel-2.7/./rpy/rinterface/r_utils.o
./rpy/rinterface/r_utils.c:236:40: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)'
  ExternallyManagedVector *extvector = malloc(sizeof(ExternallyManagedVector));
                                       ^
./rpy/rinterface/r_utils.c:236:40: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc'
1 warning generated.
ar rc build/temp.macosx-10.11-intel-2.7/libr_utils.a build/temp.macosx-10.11-intel-2.7/./rpy/rinterface/r_utils.o
ranlib build/temp.macosx-10.11-intel-2.7/libr_utils.a
running install_lib
running build_py
creating build/lib.macosx-10.11-intel-2.7
creating build/lib.macosx-10.11-intel-2.7/rpy2
copying ./rpy/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2
copying ./rpy/rpy_classic.py -> build/lib.macosx-10.11-intel-2.7/rpy2
copying ./rpy/tests.py -> build/lib.macosx-10.11-intel-2.7/rpy2
copying ./rpy/tests_rpy_classic.py -> build/lib.macosx-10.11-intel-2.7/rpy2
creating build/lib.macosx-10.11-intel-2.7/rpy2/rlike
copying ./rpy/rlike/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rlike
copying ./rpy/rlike/container.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rlike
copying ./rpy/rlike/functional.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rlike
copying ./rpy/rlike/indexing.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rlike
creating build/lib.macosx-10.11-intel-2.7/rpy2/rlike/tests
copying ./rpy/rlike/tests/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rlike/tests
copying ./rpy/rlike/tests/test_container.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rlike/tests
copying ./rpy/rlike/tests/test_functional.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rlike/tests
copying ./rpy/rlike/tests/test_indexing.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rlike/tests
creating build/lib.macosx-10.11-intel-2.7/rpy2/rinterface
copying ./rpy/rinterface/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface
creating build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_Device.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_EmbeddedR.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_Sexp.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpClosure.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpEnvironment.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpExtPtr.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpSymbol.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpVector.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpVectorNumeric.py -> build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/tests
creating build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/constants.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/conversion.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/environments.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/functions.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/help.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/language.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/methods.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/numpy2ri.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/packages.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/packages_utils.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/pandas2ri.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/robject.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
copying ./rpy/robjects/vectors.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects
creating build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testArray.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testDataFrame.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testEnvironment.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testFormula.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testFunction.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testHelp.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testLanguage.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testMethods.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testNumpyConversions.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testPackages.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testPandasConversions.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testRObject.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testRobjects.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testVector.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/tests
creating build/lib.macosx-10.11-intel-2.7/rpy2/robjects/lib
copying ./rpy/robjects/lib/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/lib
copying ./rpy/robjects/lib/dplyr.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/lib
copying ./rpy/robjects/lib/ggplot2.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/lib
copying ./rpy/robjects/lib/grid.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/lib
creating build/lib.macosx-10.11-intel-2.7/rpy2/robjects/lib/tests
copying ./rpy/robjects/lib/tests/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/lib/tests
copying ./rpy/robjects/lib/tests/test_dplyr.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/lib/tests
copying ./rpy/robjects/lib/tests/test_ggplot2.py -> build/lib.macosx-10.11-intel-2.7/rpy2/robjects/lib/tests
creating build/lib.macosx-10.11-intel-2.7/rpy2/interactive
copying ./rpy/interactive/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/interactive
copying ./rpy/interactive/packages.py -> build/lib.macosx-10.11-intel-2.7/rpy2/interactive
copying ./rpy/interactive/process_revents.py -> build/lib.macosx-10.11-intel-2.7/rpy2/interactive
creating build/lib.macosx-10.11-intel-2.7/rpy2/interactive/tests
copying ./rpy/interactive/tests/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/interactive/tests
creating build/lib.macosx-10.11-intel-2.7/rpy2/ipython
copying ./rpy/ipython/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/ipython
copying ./rpy/ipython/ggplot.py -> build/lib.macosx-10.11-intel-2.7/rpy2/ipython
copying ./rpy/ipython/html.py -> build/lib.macosx-10.11-intel-2.7/rpy2/ipython
copying ./rpy/ipython/rmagic.py -> build/lib.macosx-10.11-intel-2.7/rpy2/ipython
creating build/lib.macosx-10.11-intel-2.7/rpy2/ipython/tests
copying ./rpy/ipython/tests/__init__.py -> build/lib.macosx-10.11-intel-2.7/rpy2/ipython/tests
copying ./rpy/ipython/tests/test_rmagic.py -> build/lib.macosx-10.11-intel-2.7/rpy2/ipython/tests
running build_ext
building 'rpy2.rinterface._rinterface' extension
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DRIF_HAS_RSIGHAND=1 -DCSTACK_DEFNS=1 -DHAS_READLINE=1 -I./rpy/rinterface -I/opt/local/Library/Frameworks/R.framework/Resources/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c ./rpy/rinterface/_rinterface.c -o build/temp.macosx-10.11-intel-2.7/./rpy/rinterface/_rinterface.o
In file included from ./rpy/rinterface/_rinterface.c:104:
./rpy/rinterface/embeddedr.h:6:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
extern const unsigned int const RPY_R_INITIALIZED;
                          ^
./rpy/rinterface/embeddedr.h:7:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
extern const unsigned int const RPY_R_BUSY;
                          ^
In file included from ./rpy/rinterface/_rinterface.c:122:
./rpy/rinterface/embeddedr.c:5:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
const unsigned int const RPY_R_INITIALIZED = 0x01;
                   ^
./rpy/rinterface/embeddedr.c:6:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
const unsigned int const RPY_R_BUSY = 0x02;
                   ^
./rpy/rinterface/embeddedr.c:48:12: warning: unused variable 'res' [-Wunused-variable]
      SEXP res = rpy2_remove(Rf_mkString(name_buf), 
           ^
In file included from ./rpy/rinterface/_rinterface.c:125:
./rpy/rinterface/sexp.c:738:13: warning: unused variable 'copy' [-Wunused-variable]
  PyObject *copy = Py_True;
            ^
In file included from ./rpy/rinterface/_rinterface.c:128:
./rpy/rinterface/sequence.c:267:30: warning: implicit conversion loses integer precision: 'long' to 'R_len_t' (aka 'int') [-Wshorten-64-to-32]
    R_len_t slice_len = ihigh-ilow;
            ~~~~~~~~~   ~~~~~^~~~~
./rpy/rinterface/sequence.c:522:30: warning: implicit conversion loses integer precision: 'long' to 'R_len_t' (aka 'int') [-Wshorten-64-to-32]
    R_len_t slice_len = ihigh-ilow;
            ~~~~~~~~~   ~~~~~^~~~~
./rpy/rinterface/_rinterface.c:353:3: warning: variable 'consolecallback' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
  default:
  ^~~~~~~
./rpy/rinterface/_rinterface.c:379:7: note: uninitialized use occurs here
  if (consolecallback == NULL) {
      ^~~~~~~~~~~~~~~
./rpy/rinterface/_rinterface.c:345:24: note: initialize the variable 'consolecallback' to silence this warning
  void *consolecallback;
                       ^
                        = NULL
./rpy/rinterface/_rinterface.c:588:9: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
  int l=strlen(input_str);
      ~ ^~~~~~~~~~~~~~~~~
./rpy/rinterface/_rinterface.c:795:9: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
  int l=strlen(path_str);
      ~ ^~~~~~~~~~~~~~~~
./rpy/rinterface/_rinterface.c:1301:28: warning: implicit conversion loses integer precision: 'const Py_ssize_t' (aka 'const long') to 'int' [-Wshorten-64-to-32]
  status = Rf_initialize_R(n_args, options);
           ~~~~~~~~~~~~~~~ ^~~~~~
./rpy/rinterface/_rinterface.c:1700:13: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
  nparams = PySequence_Length(params);
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/abstract.h:1065:27: note: expanded from macro 'PySequence_Length'
#define PySequence_Length PySequence_Size
                          ^
In file included from ./rpy/rinterface/_rinterface.c:58:
./rpy/rinterface/_rinterface.h:203:44: warning: unused function 'PyRinterface_IsInitialized' [-Wunused-function]
  static PyRinterface_IsInitialized_RETURN PyRinterface_IsInitialized PyRinterface_IsInitialized_PROTO;
                                           ^
./rpy/rinterface/_rinterface.h:204:38: warning: unused function 'PyRinterface_FindFun' [-Wunused-function]
  static PyRinterface_FindFun_RETURN PyRinterface_FindFun PyRinterface_FindFun_PROTO;
                                     ^
In file included from ./rpy/rinterface/_rinterface.c:128:
./rpy/rinterface/sequence.c:2168:1: warning: unused function 'ComplexVectorSexp_AsSexp' [-Wunused-function]
ComplexVectorSexp_AsSexp(PyObject *pyfloat) {
^
16 warnings generated.
cc -bundle -undefined dynamic_lookup -Wl,-F. -arch x86_64 build/temp.macosx-10.11-intel-2.7/./rpy/rinterface/_rinterface.o -Lbuild/temp.macosx-10.11-intel-2.7 -lpcre -lbz2 -lz -lm -liconv -licuuc -licui18n -lr_utils -o build/lib.macosx-10.11-intel-2.7/rpy2/rinterface/_rinterface.so -F/opt/local/Library/Frameworks/R.framework/.. -framework R
ld: library not found for -licuuc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1

Comments (12)

  1. Laurent Gautier

    I don't have an OS X dev environment for rpy2, and this might be the first such issue reported... so there will be a bit of guess work.

    The requirement for icuuc is added at R's request. The following part is telling me this:

        Compilation parameters for rpy2's C components:
            include_dirs    = ['/opt/local/Library/Frameworks/R.framework/Resources/include']
            library_dirs    = []
            libraries       = ['pcre', 'bz2', 'z', 'm', 'iconv', 'icuuc', 'icui18n']
            extra_link_args = ['-F/opt/local/Library/Frameworks/R.framework/..', '-framework', 'R']
    

    This is coming from running:

    R CMD config --ldflags
    

    Now the question is why isn't your system (ld) does not know where to find it... can you locate icuuc ?

  2. Michael Fuller reporter

    Thanks for looking into it. I have four variants of icuuc located in /opts/local/lib:

    /opt/local/lib: ls *icuuc*
    
    libicuuc.55.1.dylib libicuuc.55.dylib   libicuuc.a          libicuuc.dylib
    

    R is installed in:

    /Library/Frameworks/
    

    and has several library directories, none of which seem to have icuuc. I also checked a version of R installed by anaconda here:

    /Users/mike/anaconda/pkgs/r-base-3.2.2-0.
    

    Again, did not see icuuc in any of the lib directories.

    Is there a way to link /opt/local/lib to ld when building with python? Would that fix it?

  3. Michael Fuller reporter

    To be thorough, since I just noticed where setup.py is looking for R libs, I just looked in:

    /opt/local/Library/Frameworks/R.framework/Versions/3.2/Resources/lib/
    

    and the only libraries there are:

    libR.dylib       libRblas.dylib   libRlapack.dylib
    

    I have no idea how I got a version of R installed in /opt/local/Library/Frameworks/.

  4. Laurent Gautier

    setup.py is getting almost all of what it needs to know about R and libraries from the executable R.

    Here the binary found in the PATH is at /opt/local/Library/Frameworks/R.framework/Resources/bin/R. If you want rpy2 to use a different installation of R, make sure that the directory with the executable is earlier in the PATH.

    Also, I am seeing a warning about R_HOME. Do you have R_HOME set ? If yes, what is its value (echo $R_HOME in a terminal). What happens when you unset R_HOME before trying to install rpy2 ?

  5. Michael Fuller reporter

    I had set R_HOME to: /Library/Frameworks/R.framework/Resources. I got the same libicuuc error when I unset R_HOME.

    Based on your advice about the PATH, I commented out the lines for Anaconda and Macports in my bash_profile, and tried again, and the install was a success!

    So evidently the problem was that one or both of the unofficial versions of R I had were missing icuuc Thank you for helping me sort this out!

  6. nic

    Hi!

    I faced the same problem today. I only installed R through macports, so removing the macports path from PATH was not an option (plus, what is the point of macports then?). Taking a closer look at how R is installed through macports I realized that /opt/local/bin/R is actually a link to /Library/Frameworks/R.framework/Resources which explains why in my case which R results in a different path than the rpy2 setup.py comes up with.

    As pointed out by Michael Fuller the libicuuc libraries are available in the macports install (/opt/local/lib), but due to the link detour in /Library/Frameworks/R.framework/Resources not available.

    To solve this issue, I was trying to figure out how to pass a path to library_dirs as an argument, but I couldn't find a way to do this with pip. As a next step I downloaded the .tar archive and installed rpy2 manually. I still couldn't figure out how to pass an additional library path to the script either, so I manually edited the function getRinterface_ext(). At the definition of the list library_dirs, I added /opt/local/bin and since this list is only modified by append(), this shouldn't cause any problems.

    After the modification i could install rpy2 and python -m rpy2.tests returned without errors.

    I am well aware that this is not an ideal solution, but there is something weird going on with the libraries in the macports R install.

  7. Alvin Thai

    I am also getting this error. What can I do to get rpy2 installed?

    Collecting rpy2
      Using cached rpy2-2.9.0.tar.gz
    Requirement already satisfied: six in /usr/local/lib/python3.6/site-packages (from rpy2)
    Building wheels for collected packages: rpy2
      Running setup.py bdist_wheel for rpy2 ... error
      Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/tmpd0_scw2epip-wheel- --python-tag cp36:
      /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py:91: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
        warnings.warn("R emitting a warning: %s" % r_home[0])
      /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py:194: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
        warnings.warn("R emitting a warning: %s" % rversion)
      R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
      /Users/athai/anaconda/lib/R/bin/R CMD config --ldflags
      /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py:219: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
        warnings.warn("R emitting a warning: %s" % output[0])
      /Users/athai/anaconda/lib/R/bin/R CMD config --cppflags
    
          Compilation parameters for rpy2's C components:
              include_dirs    = ['/Users/athai/anaconda/lib/R/include']
              library_dirs    = ['/Users/athai/anaconda/lib/R/lib']
              libraries       = ['R', 'pcre', 'lzma', 'bz2', 'z', 'm', 'iconv', 'icuuc', 'icui18n']
              extra_link_args = []
    
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.12-x86_64-3.6
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2
      copying ./rpy/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2
      copying ./rpy/rpy_classic.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2
      copying ./rpy/situation.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2
      copying ./rpy/tests.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2
      copying ./rpy/tests_rpy_classic.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike
      copying ./rpy/rlike/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike
      copying ./rpy/rlike/container.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike
      copying ./rpy/rlike/functional.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike
      copying ./rpy/rlike/indexing.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike/tests
      copying ./rpy/rlike/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike/tests
      copying ./rpy/rlike/tests/test_container.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike/tests
      copying ./rpy/rlike/tests/test_functional.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike/tests
      copying ./rpy/rlike/tests/test_indexing.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike/tests
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface
      copying ./rpy/rinterface/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      copying ./rpy/rinterface/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      copying ./rpy/rinterface/tests/test_Device.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      copying ./rpy/rinterface/tests/test_EmbeddedR.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      copying ./rpy/rinterface/tests/test_Sexp.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      copying ./rpy/rinterface/tests/test_SexpClosure.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      copying ./rpy/rinterface/tests/test_SexpEnvironment.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      copying ./rpy/rinterface/tests/test_SexpExtPtr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      copying ./rpy/rinterface/tests/test_SexpSymbol.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      copying ./rpy/rinterface/tests/test_SexpVector.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      copying ./rpy/rinterface/tests/test_SexpVectorNumeric.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/constants.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/conversion.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/environments.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/functions.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/help.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/language.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/methods.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/numpy2ri.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/packages.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/packages_utils.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/pandas2ri.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/robject.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      copying ./rpy/robjects/vectors.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testArray.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testDataFrame.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testEnvironment.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testFormula.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testFunction.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testHelp.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testLanguage.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testMethods.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testNumpyConversions.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testPackages.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testPandasConversions.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testRObject.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testRobjects.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      copying ./rpy/robjects/tests/testVector.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
      copying ./rpy/robjects/lib/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
      copying ./rpy/robjects/lib/dbplyr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
      copying ./rpy/robjects/lib/dplyr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
      copying ./rpy/robjects/lib/ggplot2.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
      copying ./rpy/robjects/lib/grdevices.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
      copying ./rpy/robjects/lib/grid.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
      copying ./rpy/robjects/lib/test_dplyr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
      copying ./rpy/robjects/lib/tidyr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib/tests
      copying ./rpy/robjects/lib/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib/tests
      copying ./rpy/robjects/lib/tests/test_dplyr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib/tests
      copying ./rpy/robjects/lib/tests/test_ggplot2.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib/tests
      copying ./rpy/robjects/lib/tests/test_grdevices.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib/tests
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive
      copying ./rpy/interactive/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive
      copying ./rpy/interactive/packages.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive
      copying ./rpy/interactive/process_revents.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive/tests
      copying ./rpy/interactive/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive/tests
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython
      copying ./rpy/ipython/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython
      copying ./rpy/ipython/ggplot.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython
      copying ./rpy/ipython/html.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython
      copying ./rpy/ipython/rmagic.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython
      creating build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython/tests
      copying ./rpy/ipython/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython/tests
      copying ./rpy/ipython/tests/test_rmagic.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython/tests
      running build_clib
      building 'r_utils' library
      creating build/temp.macosx-10.12-x86_64-3.6
      creating build/temp.macosx-10.12-x86_64-3.6/rpy
      creating build/temp.macosx-10.12-x86_64-3.6/rpy/rinterface
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I./rpy/rinterface -I/Users/athai/anaconda/lib/R/include -c ./rpy/rinterface/r_utils.c -o build/temp.macosx-10.12-x86_64-3.6/./rpy/rinterface/r_utils.o
      ar rc build/temp.macosx-10.12-x86_64-3.6/libr_utils.a build/temp.macosx-10.12-x86_64-3.6/./rpy/rinterface/r_utils.o
      ranlib build/temp.macosx-10.12-x86_64-3.6/libr_utils.a
      running build_ext
      /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py:91: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
        warnings.warn("R emitting a warning: %s" % r_home[0])
      /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py:194: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
        warnings.warn("R emitting a warning: %s" % rversion)
      R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
      building 'rpy2.rinterface._rinterface' extension
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DRIF_HAS_RSIGHAND=1 -DCSTACK_DEFNS=1 -DHAS_READLINE=1 -I./rpy/rinterface -I/Users/athai/anaconda/lib/R/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c ./rpy/rinterface/_rinterface.c -o build/temp.macosx-10.12-x86_64-3.6/./rpy/rinterface/_rinterface.o
      In file included from ./rpy/rinterface/_rinterface.c:94:
      ./rpy/rinterface/embeddedr.h:6:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
      extern const unsigned int const RPY_R_INITIALIZED;
                                ^
      ./rpy/rinterface/embeddedr.h:7:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
      extern const unsigned int const RPY_R_BUSY;
                                ^
      In file included from ./rpy/rinterface/_rinterface.c:112:
      ./rpy/rinterface/embeddedr.c:5:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
      const unsigned int const RPY_R_INITIALIZED = 0x01;
                         ^
      ./rpy/rinterface/embeddedr.c:6:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
      const unsigned int const RPY_R_BUSY = 0x02;
                         ^
      ./rpy/rinterface/embeddedr.c:48:12: warning: unused variable 'res' [-Wunused-variable]
            SEXP res = rpy2_remove(Rf_mkString(name_buf),
                 ^
      In file included from ./rpy/rinterface/_rinterface.c:115:
      ./rpy/rinterface/sexp.c:680:13: warning: unused variable 'copy' [-Wunused-variable]
        PyObject *copy = Py_True;
                  ^
      ./rpy/rinterface/_rinterface.c:1717:21: warning: incompatible pointer types assigning to 'const char *' from 'SEXP' (aka 'struct SEXPREC *') [-Wincompatible-pointer-types]
            argNameString = Rf_mkCharCE(PyBytes_AsString(pybytes), CE_UTF8);
                          ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ./rpy/rinterface/_rinterface.c:1718:32: warning: incompatible pointer types passing 'const char *' to parameter of type 'SEXP' (aka 'struct SEXPREC *') [-Wincompatible-pointer-types]
            SET_TAG(c_R, installChar(argNameString));
                                     ^~~~~~~~~~~~~
      /Users/athai/anaconda/lib/R/include/Rinternals.h:819:25: note: passing argument to parameter here
      SEXP Rf_installChar(SEXP);
                              ^
      In file included from ./rpy/rinterface/_rinterface.c:52:
      ./rpy/rinterface/_rinterface.h:194:44: warning: unused function 'PyRinterface_IsInitialized' [-Wunused-function]
        static PyRinterface_IsInitialized_RETURN PyRinterface_IsInitialized PyRinterface_IsInitialized_PROTO;
                                                 ^
      ./rpy/rinterface/_rinterface.h:195:38: warning: unused function 'PyRinterface_FindFun' [-Wunused-function]
        static PyRinterface_FindFun_RETURN PyRinterface_FindFun PyRinterface_FindFun_PROTO;
                                           ^
      In file included from ./rpy/rinterface/_rinterface.c:118:
      ./rpy/rinterface/sequence.c:1986:1: warning: unused function 'ComplexVectorSexp_AsSexp' [-Wunused-function]
      ComplexVectorSexp_AsSexp(PyObject *pyfloat) {
      ^
      11 warnings generated.
      clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/./rpy/rinterface/_rinterface.o -L/Users/athai/anaconda/lib/R/lib -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -Lbuild/temp.macosx-10.12-x86_64-3.6 -L/Users/athai/anaconda/lib/R/lib -lR -lpcre -llzma -lbz2 -lz -lm -liconv -licuuc -licui18n -lr_utils -o build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/_rinterface.cpython-36m-darwin.so
      ld: library not found for -licuuc
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command 'clang' failed with exit status 1
    
      ----------------------------------------
      Failed building wheel for rpy2
      Running setup.py clean for rpy2
    Failed to build rpy2
    Installing collected packages: rpy2
      Running setup.py install for rpy2 ... error
        Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-c1a76cq2-record/install-record.txt --single-version-externally-managed --compile:
        /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py:91: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
          warnings.warn("R emitting a warning: %s" % r_home[0])
        /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py:194: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
          warnings.warn("R emitting a warning: %s" % rversion)
        R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
        /Users/athai/anaconda/lib/R/bin/R CMD config --ldflags
        /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py:219: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
          warnings.warn("R emitting a warning: %s" % output[0])
        /Users/athai/anaconda/lib/R/bin/R CMD config --cppflags
    
            Compilation parameters for rpy2's C components:
                include_dirs    = ['/Users/athai/anaconda/lib/R/include']
                library_dirs    = ['/Users/athai/anaconda/lib/R/lib']
                libraries       = ['R', 'pcre', 'lzma', 'bz2', 'z', 'm', 'iconv', 'icuuc', 'icui18n']
                extra_link_args = []
    
        running install
        running build
        running build_py
        creating build
        creating build/lib.macosx-10.12-x86_64-3.6
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2
        copying ./rpy/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2
        copying ./rpy/rpy_classic.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2
        copying ./rpy/situation.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2
        copying ./rpy/tests.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2
        copying ./rpy/tests_rpy_classic.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike
        copying ./rpy/rlike/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike
        copying ./rpy/rlike/container.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike
        copying ./rpy/rlike/functional.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike
        copying ./rpy/rlike/indexing.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike/tests
        copying ./rpy/rlike/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike/tests
        copying ./rpy/rlike/tests/test_container.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike/tests
        copying ./rpy/rlike/tests/test_functional.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike/tests
        copying ./rpy/rlike/tests/test_indexing.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rlike/tests
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface
        copying ./rpy/rinterface/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        copying ./rpy/rinterface/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        copying ./rpy/rinterface/tests/test_Device.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        copying ./rpy/rinterface/tests/test_EmbeddedR.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        copying ./rpy/rinterface/tests/test_Sexp.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        copying ./rpy/rinterface/tests/test_SexpClosure.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        copying ./rpy/rinterface/tests/test_SexpEnvironment.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        copying ./rpy/rinterface/tests/test_SexpExtPtr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        copying ./rpy/rinterface/tests/test_SexpSymbol.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        copying ./rpy/rinterface/tests/test_SexpVector.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        copying ./rpy/rinterface/tests/test_SexpVectorNumeric.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/tests
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/constants.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/conversion.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/environments.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/functions.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/help.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/language.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/methods.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/numpy2ri.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/packages.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/packages_utils.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/pandas2ri.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/robject.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        copying ./rpy/robjects/vectors.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testArray.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testDataFrame.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testEnvironment.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testFormula.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testFunction.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testHelp.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testLanguage.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testMethods.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testNumpyConversions.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testPackages.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testPandasConversions.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testRObject.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testRobjects.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        copying ./rpy/robjects/tests/testVector.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/tests
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
        copying ./rpy/robjects/lib/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
        copying ./rpy/robjects/lib/dbplyr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
        copying ./rpy/robjects/lib/dplyr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
        copying ./rpy/robjects/lib/ggplot2.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
        copying ./rpy/robjects/lib/grdevices.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
        copying ./rpy/robjects/lib/grid.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
        copying ./rpy/robjects/lib/test_dplyr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
        copying ./rpy/robjects/lib/tidyr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib/tests
        copying ./rpy/robjects/lib/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib/tests
        copying ./rpy/robjects/lib/tests/test_dplyr.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib/tests
        copying ./rpy/robjects/lib/tests/test_ggplot2.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib/tests
        copying ./rpy/robjects/lib/tests/test_grdevices.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/robjects/lib/tests
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive
        copying ./rpy/interactive/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive
        copying ./rpy/interactive/packages.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive
        copying ./rpy/interactive/process_revents.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive/tests
        copying ./rpy/interactive/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/interactive/tests
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython
        copying ./rpy/ipython/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython
        copying ./rpy/ipython/ggplot.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython
        copying ./rpy/ipython/html.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython
        copying ./rpy/ipython/rmagic.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython
        creating build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython/tests
        copying ./rpy/ipython/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython/tests
        copying ./rpy/ipython/tests/test_rmagic.py -> build/lib.macosx-10.12-x86_64-3.6/rpy2/ipython/tests
        running build_clib
        building 'r_utils' library
        creating build/temp.macosx-10.12-x86_64-3.6
        creating build/temp.macosx-10.12-x86_64-3.6/rpy
        creating build/temp.macosx-10.12-x86_64-3.6/rpy/rinterface
        clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I./rpy/rinterface -I/Users/athai/anaconda/lib/R/include -c ./rpy/rinterface/r_utils.c -o build/temp.macosx-10.12-x86_64-3.6/./rpy/rinterface/r_utils.o
        ar rc build/temp.macosx-10.12-x86_64-3.6/libr_utils.a build/temp.macosx-10.12-x86_64-3.6/./rpy/rinterface/r_utils.o
        ranlib build/temp.macosx-10.12-x86_64-3.6/libr_utils.a
        running build_ext
        /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py:91: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
          warnings.warn("R emitting a warning: %s" % r_home[0])
        /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py:194: UserWarning: R emitting a warning: WARNING: ignoring environment value of R_HOME
          warnings.warn("R emitting a warning: %s" % rversion)
        R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
        building 'rpy2.rinterface._rinterface' extension
        clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DRIF_HAS_RSIGHAND=1 -DCSTACK_DEFNS=1 -DHAS_READLINE=1 -I./rpy/rinterface -I/Users/athai/anaconda/lib/R/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c ./rpy/rinterface/_rinterface.c -o build/temp.macosx-10.12-x86_64-3.6/./rpy/rinterface/_rinterface.o
        In file included from ./rpy/rinterface/_rinterface.c:94:
        ./rpy/rinterface/embeddedr.h:6:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
        extern const unsigned int const RPY_R_INITIALIZED;
                                  ^
        ./rpy/rinterface/embeddedr.h:7:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
        extern const unsigned int const RPY_R_BUSY;
                                  ^
        In file included from ./rpy/rinterface/_rinterface.c:112:
        ./rpy/rinterface/embeddedr.c:5:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
        const unsigned int const RPY_R_INITIALIZED = 0x01;
                           ^
        ./rpy/rinterface/embeddedr.c:6:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
        const unsigned int const RPY_R_BUSY = 0x02;
                           ^
        ./rpy/rinterface/embeddedr.c:48:12: warning: unused variable 'res' [-Wunused-variable]
              SEXP res = rpy2_remove(Rf_mkString(name_buf),
                   ^
        In file included from ./rpy/rinterface/_rinterface.c:115:
        ./rpy/rinterface/sexp.c:680:13: warning: unused variable 'copy' [-Wunused-variable]
          PyObject *copy = Py_True;
                    ^
        ./rpy/rinterface/_rinterface.c:1717:21: warning: incompatible pointer types assigning to 'const char *' from 'SEXP' (aka 'struct SEXPREC *') [-Wincompatible-pointer-types]
              argNameString = Rf_mkCharCE(PyBytes_AsString(pybytes), CE_UTF8);
                            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        ./rpy/rinterface/_rinterface.c:1718:32: warning: incompatible pointer types passing 'const char *' to parameter of type 'SEXP' (aka 'struct SEXPREC *') [-Wincompatible-pointer-types]
              SET_TAG(c_R, installChar(argNameString));
                                       ^~~~~~~~~~~~~
        /Users/athai/anaconda/lib/R/include/Rinternals.h:819:25: note: passing argument to parameter here
        SEXP Rf_installChar(SEXP);
                                ^
        In file included from ./rpy/rinterface/_rinterface.c:52:
        ./rpy/rinterface/_rinterface.h:194:44: warning: unused function 'PyRinterface_IsInitialized' [-Wunused-function]
          static PyRinterface_IsInitialized_RETURN PyRinterface_IsInitialized PyRinterface_IsInitialized_PROTO;
                                                   ^
        ./rpy/rinterface/_rinterface.h:195:38: warning: unused function 'PyRinterface_FindFun' [-Wunused-function]
          static PyRinterface_FindFun_RETURN PyRinterface_FindFun PyRinterface_FindFun_PROTO;
                                             ^
        In file included from ./rpy/rinterface/_rinterface.c:118:
        ./rpy/rinterface/sequence.c:1986:1: warning: unused function 'ComplexVectorSexp_AsSexp' [-Wunused-function]
        ComplexVectorSexp_AsSexp(PyObject *pyfloat) {
        ^
        11 warnings generated.
        clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/./rpy/rinterface/_rinterface.o -L/Users/athai/anaconda/lib/R/lib -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -Lbuild/temp.macosx-10.12-x86_64-3.6 -L/Users/athai/anaconda/lib/R/lib -lR -lpcre -llzma -lbz2 -lz -lm -liconv -licuuc -licui18n -lr_utils -o build/lib.macosx-10.12-x86_64-3.6/rpy2/rinterface/_rinterface.cpython-36m-darwin.so
        ld: library not found for -licuuc
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
        error: command 'clang' failed with exit status 1
    
        ----------------------------------------
    Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-c1a76cq2-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/jm/99lv6tfs39114phyjhm78g380000gn/T/pip-build-r8a0rsd4/rpy2/
    
  8. Alvin Thai

    Well I was able to install rpy2 on my anaconda python 2.7 distribution with the command: sudo conda install rpy2

    I can't get this to work with python 3.6 however, I get the following errors when I run the %load_ext rpy2.ipython command in Jupyter notebook. Any idea on how I can install libgfortran for python 3.6? Or maybe the @rpath isn't set properly on rpy2?

    ---------------------------------------------------------------------------
    ImportError                               Traceback (most recent call last)
    <ipython-input-1-a69f80d0128e> in <module>()
    ----> 1 get_ipython().magic('load_ext rpy2.ipython')
    
    /usr/local/lib/python3.6/site-packages/IPython/core/interactiveshell.py in magic(self, arg_s)
       2144         magic_name, _, magic_arg_s = arg_s.partition(' ')
       2145         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
    -> 2146         return self.run_line_magic(magic_name, magic_arg_s)
       2147 
       2148     #-------------------------------------------------------------------------
    
    /usr/local/lib/python3.6/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line)
       2065                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
       2066             with self.builtin_trap:
    -> 2067                 result = fn(*args,**kwargs)
       2068             return result
       2069 
    
    <decorator-gen-65> in load_ext(self, module_str)
    
    /usr/local/lib/python3.6/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
        185     # but it's overkill for just that one bit of state.
        186     def magic_deco(arg):
    --> 187         call = lambda f, *a, **k: f(*a, **k)
        188 
        189         if callable(arg):
    
    /usr/local/lib/python3.6/site-packages/IPython/core/magics/extension.py in load_ext(self, module_str)
         31         if not module_str:
         32             raise UsageError('Missing module name.')
    ---> 33         res = self.shell.extension_manager.load_extension(module_str)
         34 
         35         if res == 'already loaded':
    
    /usr/local/lib/python3.6/site-packages/IPython/core/extensions.py in load_extension(self, module_str)
         83             if module_str not in sys.modules:
         84                 with prepended_to_syspath(self.ipython_extension_dir):
    ---> 85                     mod = import_module(module_str)
         86                     if mod.__file__.startswith(self.ipython_extension_dir):
         87                         print(("Loading extensions from {dir} is deprecated. "
    
    /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py in import_module(name, package)
        124                 break
        125             level += 1
    --> 126     return _bootstrap._gcd_import(name[level:], package, level)
        127 
        128 
    
    /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py in _gcd_import(name, package, level)
    
    /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)
    
    /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
    
    /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py in _load_unlocked(spec)
    
    /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap_external.py in exec_module(self, module)
    
    /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
    
    /usr/local/lib/python3.6/site-packages/rpy2/ipython/__init__.py in <module>()
    ----> 1 from .rmagic import load_ipython_extension
    
    /usr/local/lib/python3.6/site-packages/rpy2/ipython/rmagic.py in <module>()
         51 # numpy and rpy2 imports
         52 
    ---> 53 import rpy2.rinterface as ri
         54 import rpy2.robjects as ro
         55 import rpy2.robjects.packages as rpacks
    
    /usr/local/lib/python3.6/site-packages/rpy2/rinterface/__init__.py in <module>()
         48 del(os)
         49 
    ---> 50 from rpy2.rinterface._rinterface import (baseenv,
         51                                          emptyenv,
         52                                          endr,
    
    ImportError: dlopen(/usr/local/lib/python3.6/site-packages/rpy2/rinterface/_rinterface.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libgfortran.3.dylib
      Referenced from: /usr/local/lib/python3.6/site-packages/rpy2/rinterface/_rinterface.cpython-36m-darwin.so
      Reason: image not found
    
  9. Log in to comment