简体   繁体   English

未加载库:Prophet / Python 中的@rpath/libtbb.dylib

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

I'm on a Mac X1, Monterey.我在蒙特雷的 Mac X1 上。

I've installed prophet and run into this issue when trying to fit a model.我已经安装了先知并在尝试安装 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我可以找到 dylib

/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?我很好奇如何更新/修复 rpath 变量或找到另一个解决方案?

I tried to create a symbolic link with sudo ln -s, but don't have permissions on the laptop.我尝试使用 sudo ln -s 创建符号链接,但在笔记本电脑上没有权限。

TIA!蒂亚!

I got it to work on Apple Silicon (M1 Max in my case) by installing older versions of both pystan and prophet:通过安装旧版本的 pystan 和先知,我让它在 Apple Silicon(在我的情况下为 M1 Max)上工作:

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.另一个重要的难题是您应该使用 Python 3.8来让它工作。

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.安装旧版本的库和使用 Python 3.8 都在 Github 的issue #2002中进行了讨论,但并没有真正解释 libtbb.dylib 错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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