Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bayes metab issues #418

Open
miralha opened this issue Jan 31, 2023 · 1 comment
Open

Bayes metab issues #418

miralha opened this issue Jan 31, 2023 · 1 comment

Comments

@miralha
Copy link

miralha commented Jan 31, 2023

I have tried several times to remove and reinstall rstan and stanheaders packages and I keep getting the following errors:
When trying to run the example:

rstan_options(auto_write = TRUE)
example(stan_model, run.dontrun = TRUE)

Compilation ERROR, function(s)/method(s) not created! Error in compileCode(f, code, language = language, verbose = verbose) : /bin/sh: line 1: C:/rtools42/mingw64/bin/g++: No such file or directorymake: *** [C:/PROGRA1/R/R-421.2/etc/x64/Makeconf:260: file2b8c2ce291.o] Error 127

When trying to run the metab function:

mm <- metab(bayes_specs, data=dat1)

Timing stopped at: 0.95 0.18 1.5
Warning message:
In metab_fun(specs = specs, data = data, data_daily = data_daily, :
Modeling failed
Errors:
invalid connection

How can I fix this?

@miralha miralha changed the title I have tried several times to remove ans reinstall rstan and stanheaders package and I keep getting the foloowing errors:Compilation ERROR, function(s)/method(s) not created! Error in compileCode(f, code, language = language, verbose = verbose) : /bin/sh: line 1: C:/rtools42/mingw64/bin/g++: No such file or directorymake: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:260: file2b8c2ce291.o] Error 127 I have tried several times to remove ans reinstall rstan and stanheaders package and I keep getting the foloowing errors: Compilation ERROR, function Timing stopped at: 0.95 0.18 1.5 Warning message: In metab_fun(specs = specs, data = data, data_daily = data_daily, : Modeling failed Errors: invalid connection(s)/method(s) not created! Error in compileCode(f, code, language = language, verbose = verbose) : /bin/sh: line 1: C:/rtools42/mingw64/bin/g++: No such file or directorymake: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:260: file2b8c2ce291.o] Error 127 Jan 31, 2023
@miralha miralha changed the title I have tried several times to remove ans reinstall rstan and stanheaders package and I keep getting the foloowing errors: Compilation ERROR, function Timing stopped at: 0.95 0.18 1.5 Warning message: In metab_fun(specs = specs, data = data, data_daily = data_daily, : Modeling failed Errors: invalid connection(s)/method(s) not created! Error in compileCode(f, code, language = language, verbose = verbose) : /bin/sh: line 1: C:/rtools42/mingw64/bin/g++: No such file or directorymake: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:260: file2b8c2ce291.o] Error 127 I have tried several times to remove and reinstall rstan and stanheaders packages and I keep getting the following errors: Compilation ERROR, function Timing stopped at: 0.95 0.18 1.5 Warning message: In metab_fun(specs = specs, data = data, data_daily = data_daily, : Modeling failed Errors: invalid connection(s)/method(s) not created! Error in compileCode(f, code, language = language, verbose = verbose) : /bin/sh: line 1: C:/rtools42/mingw64/bin/g++: No such file or directorymake: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:260: file2b8c2ce291.o] Error 127 Jan 31, 2023
@miralha miralha changed the title I have tried several times to remove and reinstall rstan and stanheaders packages and I keep getting the following errors: Compilation ERROR, function Timing stopped at: 0.95 0.18 1.5 Warning message: In metab_fun(specs = specs, data = data, data_daily = data_daily, : Modeling failed Errors: invalid connection(s)/method(s) not created! Error in compileCode(f, code, language = language, verbose = verbose) : /bin/sh: line 1: C:/rtools42/mingw64/bin/g++: No such file or directorymake: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:260: file2b8c2ce291.o] Error 127 Bayes metab issues Jan 31, 2023
@aappling-usgs
Copy link
Contributor

Is it possible your compilation tools aren't up to snuff? Looks like it can't find C:/rtools42/mingw64/bin/g++ (a compiler). Start at the rstan wiki page for the most up-to-date rstan installation instructions, which differ by operating system. Specifically, looks like you probably need RTools for your Windows system: https://github.com/stan-dev/rstan/wiki/Configuring-C---Toolchain-for-Windows, and then will need to reinstall those packages (again!) from mc-stan.org:

install.packages("StanHeaders", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants