简体   繁体   中英

Library not loaded: @rpath/libtbb.dylib in Prophet / Python

I'm on a Mac X1, Monterey.

I've installed prophet and run into this issue when trying to fit a model.

RuntimeError: Error during optimization: console log output:

dyld[90668]: Library not loaded: @rpath/libtbb.dylib

Referenced from: /Users/{username}/opt/anaconda3/lib/python3.9/site-packages/prophet/stan_model/prophet_model.bin
  Reason: tried: '/private/var/folders/cd/dfrqgp4s4ll55cwb7rtgccbw0000gq/T/pip-install-rjpuj450/prophet_d7e4cce10e414c89a572fe3605ae9269/build/lib.macosx-11.1-arm64-cpython-39/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/cd/dfrqgp4s4ll55cwb7rtgccbw0000gq/T/pip-install-rjpuj450/prophet_d7e4cce10e414c89a572fe3605ae9269/build/lib.macosx-11.1-arm64-cpython-39/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 know this has to do with the wrong paths being searched. I can find the dylib in

/Users/{user}/opt/anaconda3/lib/python3.9/site-packages/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/

But, it seems prophet doesn't know to look there. I'm curious how I can update/fix either the rpath variable or find another solution?

I tried to create a symbolic link with sudo ln -s, but don't have permissions on the laptop.

TIA!

I got it to work on Apple Silicon (M1 Max in my case) by installing older versions of both pystan and prophet:

pip install pystan==2.19.1.1
pip install prophet==1.0

The other important piece of the puzzle is that you should use Python 3.8 to get it working.

Installing older versions of the libraries and using Python 3.8 are both talked about in issue #2002 on Github, but there's not really an explanation of the libtbb.dylib error message.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM