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