facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.55k stars 4.54k forks source link

Install Error in R #1555

Closed thorswapnil7 closed 4 years ago

thorswapnil7 commented 4 years ago

I have installed RTools, tried installing 'Source' version of prophet, uninstalled rstan, reinstalled rstan 2.0.

Trying to do following:

install.packages("prophet", type = "source")

*** arch - i386 Error in .shlib_internal(args) : C++14 standard requested but CXX14 is not defined

Can somebody help ?

bletham commented 4 years ago

Sorry for the slow reply!

It seems that the C++ toolchain has not been configured and so rstan isn't working. You can verify if it is the case that rstan isn't working by running this code:

library(rstan)
model_code <- 'parameters {real y;} model {y ~ normal(0,1);}'
fit <- stan(model_code=model_code)  # this will take a minute
mean(extract(fit)$y)  # should be close to 0

Beyond that I'm not certain what is happening. Prophet ships with some compiler flags that should work (https://github.com/facebook/prophet/tree/0d260699e4776c449703a957f08eca8013461a47/R/src) but maybe they're not right for your system. Rstan has instructions on how to configure the C++ toolchain here: https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started

This issue also seems very related and the solution given by bgoodri there could work: https://github.com/stan-dev/rstanarm/issues/325