Error: package or namespace load failed for ‘prophet’ in dyn.load(file, DLLpath = DLLpath, ...)
See original GitHub issueGreat package. I have integrated into modeltime
(R package that uses prophet with tidymodels ecosystem). It’s working great.
I did run into one issue when using on MacOS (Windows I have not experienced this problem). I’ve referenced the issue business-science/modeltime#20.
Problem
MacOS seems to have an issue (sometimes???) when loading prophet.
> library(prophet)
Loading required package: Rcpp
Loading required package: rlang
Error: package or namespace load failed for ‘prophet’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/prophet/libs/prophet.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/prophet/libs/prophet.so, 6): Library not loaded: @rpath/libtbb.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/prophet/libs/prophet.so
Reason: image not found
Solution
The easiest way to fix is to load StanHeaders.
This sets the C++ flags and libraries, which seems to solve the missed libtbb.dylib
path.
How I solved it with modeltime
:
Add StanHeaders to Imports
Somewhere in the package import StanHeaders.
The same solution will work for prophet
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Error loading prophet library in R - How can I fix it?
library(prophet) > Error: package or namespace load failed for 'prophet' > in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared > object ......
Read more >Error loading prophet library in R - How can I fix it?
library(prophet) > Error: package or namespace load failed for 'prophet' > in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared ...
Read more >Error: package or namespace load failed for 'DESeq2' in ...
I tried to download the "locfit" package but I can't find it anywhere. What do you think is the problem? DESeq2 • 3.8k...
Read more >问答- 腾讯云开发者社区-腾讯云
... Loading required package: Rcpp Loading required package: rlang Error: package or namespace load failed for 'prophet' in dyn.load(file, DLLpath = DLLpath ......
Read more >[Solved]-Installing mclust package problem. ...
Installation is preparing for lazy loading and never finishes-R. ... package or namespace load failed for 'stringi' in dyn.load(file, DLLpath = DLLpath, ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @seanjtaylor & @bletham - I checked and this fixes the issues. Thanks for merging. I just had another student with the same issue.
Hey Ben,
Yes - I can do this. I know it will work because I’ve been doing it manually:
Works fine on my machine. And all StanHeaders does is generate the C++ bindings for Rcpp & Stan (so it’s super lightweight).
I have a stacked schedule but hopefully by weekend I can send a PR addressing this.