reticulate install failure

This is happening on Macos 10.13.6 with R 3.6.2 Clang 8.0 and gfortran 6.1.

My whole session is below.


R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[R.app GUI 1.70 (7735) x86_64-apple-darwin15.6.0]

[Workspace restored from /Users/haroldnelson/.RData]
[History restored from /Users/haroldnelson/.Rapp.history]

> install.packages("reticulate")
also installing the dependencies ‘jsonlite’, ‘rappdirs’, ‘Rcpp’


  There is a binary version available but the source version is
  later:
           binary source needs_compilation
reticulate   1.13   1.14              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
trying URL 'http://cran.cnr.Berkeley.edu/bin/macosx/el-capitan/contrib/3.6/jsonlite_1.6.tgz'
Content type 'application/x-gzip' length 1117755 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'http://cran.cnr.Berkeley.edu/bin/macosx/el-capitan/contrib/3.6/rappdirs_0.3.1.tgz'
Content type 'application/x-gzip' length 81311 bytes (79 KB)
==================================================
downloaded 79 KB

trying URL 'http://cran.cnr.Berkeley.edu/bin/macosx/el-capitan/contrib/3.6/Rcpp_1.0.3.tgz'
Content type 'application/x-gzip' length 3099696 bytes (3.0 MB)
==================================================
downloaded 3.0 MB


The downloaded binary packages are in
	/var/folders/yk/qld_717970z9hnwkc_y2lr6w0000gp/T//Rtmppxdes2/downloaded_packages
installing the source package ‘reticulate’

trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/reticulate_1.14.tar.gz'
Content type 'application/x-gzip' length 1504849 bytes (1.4 MB)
==================================================
downloaded 1.4 MB

* installing *source* package ‘reticulate’ ...
** package ‘reticulate’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from RcppExports.cpp:4:
In file included from ./reticulate_types.h:4:
In file included from ./libpython.h:5:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:477:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:641:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:61:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:61:15: fatal error: 'string.h' file not found
#include_next <string.h>
              ^~~~~~~~~~
1 error generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘reticulate’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/reticulate’

The downloaded source packages are in
	‘/private/var/folders/yk/qld_717970z9hnwkc_y2lr6w0000gp/T/Rtmppxdes2/downloaded_packages’
Warning message:
In install.packages("reticulate") :
  installation of package ‘reticulate’ had non-zero exit status

Have you tried reinstalling/updating xcode in your system?

Also, if you don't need the latest versions right now, you could y simply install the binary version.

I tried to update xcode on the machine I was working with, but discovered that it was too old, a 10 year old iMac with hisierra. I then moved to my new mac, running catalina and updated the xcode on it. I even started up xcode and discovered that it needed missing components, which I installed. I also installed clang 8.0 and gfortran 6.1

The install of reticulate still fails. Here's the session.

R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[R.app GUI 1.70 (7735) x86_64-apple-darwin15.6.0]

[Workspace restored from /Users/haroldnelson/.RData]
[History restored from /Users/haroldnelson/.Rhistory]

install.packages("reticulate")

There is a binary version available but the source version is later:
binary source needs_compilation
reticulate 1.13 1.14 TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
installing the source package ‘reticulate’

trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/reticulate_1.14.tar.gz'
Content type 'application/x-gzip' length 1504849 bytes (1.4 MB)

downloaded 1.4 MB

  • installing source package ‘reticulate’ ...
    ** package ‘reticulate’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
    clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
    In file included from RcppExports.cpp:4:
    In file included from ./reticulate_types.h:4:
    In file included from ./libpython.h:5:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:505:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string_view:176:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__string:57:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:642:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:61:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string.h:61:15: fatal error: 'string.h' file not found
    #include_next <string.h>
    ^~~~~~~~~~
    1 error generated.
    make: *** [RcppExports.o] Error 1
    ERROR: compilation failed for package ‘reticulate’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/reticulate’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/reticulate’

The downloaded source packages are in
‘/private/var/folders/xw/vqmwg_6n2_94y05gdv75g3sh0000gn/T/RtmpJyjQFV/downloaded_packages’
Warning message:
In install.packages("reticulate") :
installation of package ‘reticulate’ had non-zero exit status

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.