prophet icon indicating copy to clipboard operation
prophet copied to clipboard

Propet CMDStanpy error - Procedure Entry Point Not Located

Open Haridut opened this issue 2 years ago • 4 comments

Platform : Windows 10 Python version : 3.8.8 Prophet : 1.1 (not fbprophet)

The 'cmdstanpy' and 'prophet' packages are successfully installed. But I am getting this error while running my model - "The procedure entry point _ZNt3bb19task_scheduler_init10initilaizeEiy could not be located in the dynamic link library D:/ProgramData/ Anaconda3/Lib/site-packages/prophet/stan_model/prophet_model.bin"

Any suggestions? image (2)

Haridut avatar Aug 29 '22 22:08 Haridut

Hey @Haridut, In order to solve this problem, you will have to keep 2 points under consideration.

  1. This package will not work under "$ Base" environment. So first, you will have to create separate environment, and install prophet in newly created environment.
  2. Then change your kernel from base to newly created environment's kernel.

CONCLUSION: To use "prophet", you will have to change your environment from Base to any other environment (or create new one). And perform your entire "prophet" related task in that particular environment.

@Haridut , let me know whether it works for you or not.

Akash-Jariwala avatar Sep 03 '22 18:09 Akash-Jariwala

I have the same problem. I created an exe file using the pyinstaller with prophet, which works well on the main computer, but not on the subcomputer.

Zirraf avatar Sep 14 '22 04:09 Zirraf

I solved this problem in my work. It didn't work when I proceeded with the administrator account, but it worked when I created and ran a new account. I hope it helps.

Zirraf avatar Sep 15 '22 10:09 Zirraf

I have the same problem when I ran a model.fit() in notebook. And I was in my conda environment, but still met this problem

hanlinGao avatar Sep 21 '22 11:09 hanlinGao

I got the same error and I tried to follow the suggested steps: I created a new conda environment and installed prophet. I ran model.fit() in the new environment and I again got the prophet_model.bin - Entry Point Not Found error message

kinga-k-farkas avatar Oct 29 '22 02:10 kinga-k-farkas

Platform : Windows 10 Python version : 3.8.8 Prophet : 1.1 (not fbprophet)

The 'cmdstanpy' and 'prophet' packages are successfully installed. But I am getting this error while running my model - "The procedure entry point _ZNt3bb19task_scheduler_init10initilaizeEiy could not be located in the dynamic link library D:/ProgramData/ Anaconda3/Lib/site-packages/prophet/stan_model/prophet_model.bin"

Any suggestions? image (2)

I downgrade mi versión of fbprophet, and a library named cmdstanpy was downgraded also to version 0.9.5, that way function to me, hope it function to you

josemiguelCalvache avatar Nov 18 '22 16:11 josemiguelCalvache

That's how I resolved the issue. Python 3.9 Prophet 1.1.1

pip install cmdstanpy Then in the libs import section, I've added import cmdstanpy cmdstanpy.install_cmdstan(compiler=True)

moo-aly avatar Nov 22 '22 16:11 moo-aly

Hey @Haridut, In order to solve this problem, you will have to keep 2 points under consideration.

1. This package will not work under **"$ Base"** environment. So first, you will have to create separate environment, and install prophet in newly created environment.

2. Then change your kernel from base to newly created environment's kernel.

CONCLUSION: To use "prophet", you will have to change your environment from Base to any other environment (or create new one). And perform your entire "prophet" related task in that particular environment.

@Haridut , let me know whether it works for you or not.

I created new environment and installed prophet in that environment but still I am getting the same issue.

sksharma7 avatar Dec 29 '22 16:12 sksharma7

Finally what worked for me :

on conda prompt activate the environment using

conda activate envname

then I ran this as per documentation https://mc-stan.org/cmdstanpy/installation.html

conda install -c conda-forge cmdstanpy

and import cmdstanpy

sksharma7 avatar Dec 29 '22 17:12 sksharma7

import cmdstanpy cmdstanpy.install_cmdstan(compiler=True)

Amazing, thanks! Works from Jupyter notebook under WIndows after your fix.

fingoldo avatar Feb 06 '23 21:02 fingoldo

지금도 prophet 모듈이 포함된 ~.py를 pyinstaller로 exe를 빌드하여 실행하면 오류가 나네요. 어떻게 해결해야 되죠?

오류 내용은 다음과 같습니다. (myenv) D:\프로그램\COINAUTO\dist>test2 Installing CmdStan version: 2.32.0 Install directory: C:\Users\user.cmdstan 17:05:01 - cmdstanpy - INFO - Add C++ toolchain to $PATH: C:\Users\user.cmdstan\RTools40 CmdStan version 2.32.0 already installed Traceback (most recent call last): File "test2.py", line 32, in File "test2.py", line 20, in predict_price File "prophet\forecaster.py", line 143, in init File "prophet\forecaster.py", line 156, in _load_stan_backend AttributeError: 'Prophet' object has no attribute 'stan_backend' [33108] Failed to execute script 'test2' due to unhandled exception!

jaeil6557 avatar Apr 26 '23 08:04 jaeil6557

To resolve the problem you can apply the following:

  • open cmd and type: where.exe tbb.dll If below command has a result, the most probably is that exist a global variable on machine making reference to tbb.dll To resolve this conflict you have 2 options:
  1. Validate the origin of the global variable link to tbb.dll
  2. Modify the model.py of cmdstanpy folder on python site-packages on the following lines:

Original Code if platform.system() == 'Windows': try: do_command(['where.exe', 'tbb.dll'], fd_out=None)

Modified Code if platform.system() == 'Windows': try: do_command(['where.exe', 'OTHERNAMEtbb.dll'], fd_out=None)

Modify the name tbb.dll to other name to force use the tbb.dll that exist inside cmdstanpy folder:

  • site-packages\prophet\stan_model\cmdstan-2.33.1\stan\lib\stan_math\lib

With this, the prophet_model.bin use the tbb library that contains the correct binaries.

dbayona avatar Feb 01 '24 22:02 dbayona