facebook / facebook/prophet

[Python] Error when running fit(): Library not loaded: '@rpath/libtbb.dylib'

Open
#2,250 20 comments 15 reactions 0 assignees View on GitHub
install mac py
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

When running `Prophet().fit()` on a Mac (Monterey `12.5.1`, Apple M1 Max Chip), I get the following error message:

```
cmdstanpy - ERROR - Chain [1] error: terminated by signal 6 Unknown error: -6
Traceback (most recent call last):
File "/Users/xxx/xxx/xxx/xxx/xxx/xxx/tests/test_prophet.py", line 67, in
test_prophet()
File "/Users/xxx/xxx/xxx/xxx/xxx/xxx/tests/test_prophet.py", line 29, in test_prophet
model.fit(df)
File "/Users/xxx/xxx/xxx/xxx/xxx/xxx/.venv/lib/python3.8/site-packages/prophet/forecaster.py", line 1171, in fit
self.params = self.stan_backend.fit(stan_init, dat, **kwargs)
File "/Users/xxx/xxx/xxx/xxx/xxx/xxx/.venv/lib/python3.8/site-packages/prophet/models.py", line 112, in fit
raise e
File "/Users/xxx/xxx/xxx/xxx/xxx/xxx/.venv/lib/python3.8/site-packages/prophet/models.py", line 102, in fit
self.stan_fit = self.model.optimize(**args)
File "/Users/xxx/xxx/xxx/xxx/xxx/xxx/.venv/lib/python3.8/site-packages/cmdstanpy/model.py", line 731, in optimize
raise RuntimeError(msg)
RuntimeError: Error during optimization: console log output:

dyld[29330]: Library not loaded: '@rpath/libtbb.dylib'
Referenced from: '/Users/xxx/xxx/xxx/xxx/xxx/xxx/.venv/lib/python3.8/site-packages/prophet/stan_model/prophet_model.bin'
Reason: tried: '/private/var/folders/h2/rc68jj_17r1dp8c05qbhlr500000gn/T/pip-req-build-lk5m800e/build/lib.macosx-10.14-arm64-cpython-38/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/h2/rc68jj_17r1dp8c05qbhlr500000gn/T/pip-req-build-lk5m800e/build/lib.macosx-10.14-arm64-cpython-38/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/usr/local/lib/libtbb.dylib' (no such file), '/usr/lib/libtbb.dylib' (no such file)
```

I ran my code in VSCode and used `poetry add prophet` to install prophet in my project's env. This is prophet v1.1. Any ideas or help are welcome.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.