I have installed Rcpp in the R console with this command that until now ussually works for installing packages to run on jupyter notebooks:
install.packages('Rcpp', '/home/user/anaconda3/lib/R/library/')
Then in the console I do:
library(Rcpp)
evalCpp("2+2")
and it works, but when I do the same on Jupyter notebooks it does not work, giving me this error message:
/home/tyatabe/anaconda3/bin/x86_64-conda_cos6-linux-gnu-c++ -I/home/tyatabe/anaconda3/lib/R/include -DNDEBUG -I'/home/tyatabe/anaconda3/lib/R/library/SimInf/include' -I"/home/tyatabe/anaconda3/lib/R/library/Rcpp/include" -I"/tmp/RtmpC4usUT/sourceCpp-x86_64-conda_cos6-linux-gnu-0.12.15" -D_FORTIFY_SOURCE=2 -O2 -I/home/tyatabe/anaconda3/include -fpic -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto -ffat-lto-objects -Wno-unused-local-typedefs -Wno-ignored-attributes -Wno-deprecated-declarations -c file345f2e80a7c7.cpp -o file345f2e80a7c7.o /home/tyatabe/anaconda3/lib/R/etc/Makeconf:167: recipe for target 'file345f2e80a7c7.o' failed Error in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, : Error 1 occurred building shared library. Traceback:
- evalCpp("2+2")
- cppFunction(code, depends = depends, plugins = plugins, includes = includes, . env = env, rebuild = rebuild, cacheDir = cacheDir, showOutput = showOutput, . verbose = verbose)
- sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, . showOutput = showOutput, verbose = verbose)
- stop("Error ", status, " occurred building shared library.")
WARNING: The tools required to build C++ code for R were not found.
Please install GNU development tools including a C++ compiler.
I'm running on a 64 bit machine with Ubuntu 16.04.
Any ideas on how can I make Rcpp work on jupyter?
Thanks,
Tada