When installing healthcareai-r as the first (or at least one of the first) packages to be installed after installing the R executable its self many dependencies are downloaded. The majority of these finish installing without issue, however after ~10 min the following error message is thrown:
ERROR: dependency ‘ModelMetrics’ is not available for package ‘caret’
* removing ‘/usr/local/lib/R/3.5/site-library/caret’
Warning in install.packages :
installation of package ‘caret’ had non-zero exit status
ERROR: dependency ‘caret’ is not available for package ‘healthcareai’
* removing ‘/usr/local/lib/R/3.5/site-library/healthcareai’
Warning in install.packages :
installation of package ‘healthcareai’ had non-zero exit status
Trying to explicitly install caret using install.packages("caret") gives this error:
auc_.cpp:2:10: fatal error: 'omp.h' file not found
#include <omp.h>
^~~~~~~
1 error generated.
make: *** [auc_.o] Error 1
ERROR: compilation failed for package ‘ModelMetrics’
* removing ‘/usr/local/lib/R/3.5/site-library/ModelMetrics’
Warning in install.packages :
installation of package ‘ModelMetrics’ had non-zero exit status
ERROR: dependency ‘ModelMetrics’ is not available for package ‘caret’
* removing ‘/usr/local/lib/R/3.5/site-library/caret’
Warning in install.packages :
installation of package ‘caret’ had non-zero exit status
The issue is resolved by installing libomp. In my case I used brew install libomp.
This may be an issue with caret, but I'll put it here for the record.
To recreate:
Uninstall R. e.g. brew uninstall r
Remove all installed packages. e.g. rm -fr /usr/local/lib/R
Remove libomp. e.g. brew uninstall libomp
Reinstall R. e.g. brew install r
Attempt to install healthcareai. i.e. install.packages("healthcareai")
@MaxTaggart I wouldn't install R with homebrew. Would you mind installing via the installer and let me know how that goes: https://cran.r-project.org/bin/macosx/
OS: macOS 10.13.16 Machine: MacBook Pro 2.6GHz Intel Core i7 (2017)
When installing
healthcareai-r
as the first (or at least one of the first) packages to be installed after installing theR
executable its self many dependencies are downloaded. The majority of these finish installing without issue, however after ~10 min the following error message is thrown:Trying to explicitly install
caret
usinginstall.packages("caret")
gives this error:The issue is resolved by installing
libomp
. In my case I usedbrew install libomp
. This may be an issue with caret, but I'll put it here for the record.To recreate:
brew uninstall r
rm -fr /usr/local/lib/R
libomp
. e.g.brew uninstall libomp
brew install r
healthcareai
. i.e.install.packages("healthcareai")