Installing CmdStan v2.27.0 in C:/Users/SF Liu/Documents/.cmdstanr/cmdstan-2.27.0
Downloading cmdstan-2.27.0.tar.gz from GitHub…
Removing the existing installation of CmdStan…
Download complete
Unpacking archive…
Building CmdStan binaries…
Error in rethrow_call(c_processx_exec, command, c(command, args), pty, :
Command ‘mingw32-make.exe’ not found @win/processx.c:982 (processx_exec)
Type .Last.error.trace to see where the error occurred
In addition: Warning messages:
1: In readChar(make_local_path, file.info(make_local_path)$size) :
can only read in bytes in a non-UTF-8 MBCS locale
2: In readChar(make_local_path, file.info(make_local_path)$size) :
can only read in bytes in a non-UTF-8 MBCS locale
My system has installed make.exe but doesn’t get mingw32-make.exe. I’m wondering how to fix it.
D:>g++ --version
g++ (MinGW.org GCC-6.3.0-1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
D:>make --version
GNU Make 3.82.90
Built for i686-pc-mingw32
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
but it should be featured more prominently somewhere in the CmdStanR vignettes - perhaps a “troubleshooting the installation” section?
this has also been a pain point for CmdStanPy users on Windows - we’re working on a better solution that doesn’t require following instructions and checking screenshots.
@mitzimorris This was the answer in the past. Well it still is, but we handle this automatically also. We install mingw32-make and fix and PATH issues or warn on other problematic issues that we cant fix automatically.
Thanks. I tried to write
pacman -Syu mingw-w64-x86_64-make
in Rtools Bash, but got
(9/9) Checking the key in the key ring [#####################] 100%
(9/9) Checking package integrity [#####################] 100%
(9/9) Loading package file [#####################] 100%
(9/9) Checking file conflict [#####################] 100%
Error: Unable to submit for processing (conflicting files)
mingw-w64-x86_64-expat: /mingw64 already exists in the file system
mingw-w64-x86_64-gettext: /mingw64 already exists in the file system
mingw-w64-x86_64-make: /mingw64 already exists in the file system
An error has occurred and no software packages have been updated.
The reason I add ‘check_toolchain = FALSE’ is just because I can not run it with True. It returns
install_cmdstan(cores =4, overwrite=TRUE)
Error:
RTools installation found but PATH was not properly set.
Run check_cmdstan_toolchain(fix = TRUE) to fix the issue.
OK, let’s try the suggestion.
check_cmdstan_toolchain(fix = TRUE)
Installing mingw32-make and writing RTools path to ~/.Renviron …
Error in rethrow_call(c_processx_exec, command, c(command, args), pty, :
Command ‘pacman’ not found @win/processx.c:982 (processx_exec)
Type .Last.error.trace to see where the error occurred
In addition: Warning message:
No write permissions in the RTools folder. This might prevent installing mingw32-make. Consider changing permissions or reinstalling RTools in a different folder.
Here is the path of my Rtools 4.0,
D:\R\Rtools
And the PATH environment I set is
D:\R\Rtools\mingw_64\bin
Should I put it in C:/ or rename it? Or can you see anything goes wrong?