Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22299

Can't install reticulate in R

$
0
0

I'm trying to install reticulate so I can execute some Python code I've written from within R. Unfortunately, I'm having trouble installing the package and haven't had much luck in determining the reason.

I've found that it likely has something to do with compiling the package and possible issues with gcc or different versions of c++ compilers, but I'm a bit out of my depth with those issues and haven't been able to get anything working. I've tried uninstalling and reinstalling xcode command line tools, but that didn't solve the issue. Beyond that, I'm not entirely sure where to start. I'm hoping somebody has experienced this and there's a straightforward answer, I'd really appreciate any help.

> 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) y
installing the source package ‘reticulate’

trying URL 'https://cran.rstudio.com/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
** libs
/usr/local/bin/gcc-8  -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
/usr/local/bin/gcc-8  -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -c event_loop.cpp -o event_loop.o
/usr/local/bin/gcc-8  -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -c libpython.cpp -o libpython.o
/usr/local/bin/gcc-8  -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -c output.cpp -o output.o
/usr/local/bin/gcc-8  -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -c python.cpp -o python.o
/usr/local/bin/gcc-8  -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -c readline.cpp -o readline.o
/usr/local/bin/gcc-8 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o reticulate.so RcppExports.o event_loop.o libpython.o output.o python.o readline.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/3.5/Resources/library/reticulate/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘reticulate’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/reticulate/libs/reticulate.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/reticulate/libs/reticulate.so, 6): Symbol not found: __ZNSt15basic_streambufIcSt11char_traitsIcEE5imbueERKSt6locale
  Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/reticulate/libs/reticulate.so
  Expected in: flat namespace
 in /Library/Frameworks/R.framework/Versions/3.5/Resources/library/reticulate/libs/reticulate.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/reticulate’
Warning in install.packages :
  installation of package ‘reticulate’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/4g/ctbqp07114x4brzp4hr8zfc40000gn/T/RtmpDNvElq/downloaded_packages’

Session Info:

> sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.15.2

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.5.3 tools_3.5.3    yaml_2.2.0  

Viewing all articles
Browse latest Browse all 22299

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>