Prophet: ImportError: DLL load failed: The specified module could not be found.

Created on 10 Nov 2018  ·  5Comments  ·  Source: facebook/prophet

Hi For the sake of fbProhpet, I pip3 install pystan, which seems successfully without any issue,

But when I pip the prophet, the error is

import pystan._api # stanc wrapper

ImportError: DLL load failed: The specified module could not be found.

I don't know how to fix it, anyone can help me?
I spend 2 days on this, all methods I can get from the Internet.

Thanks ahead!

Most helpful comment

@oliesen5 I was getting that message while trying to install from pip alone on Windows. It's not going to happen, unfortunately; you really need conda for this one. After installing miniconda 3.7, these instructions got me there. I had RStan working fine and I assumed I could tap into the RTools mingw-w64 compiler, but no deal.

Update: it's the next day and after all that fun getting pystan installed, I ended up starting with a clean environment and running conda install -c conda-forge fbprophet, which did everything. (I created a dependency problem for conda in the previous environment.)

All 5 comments

It seems that Stan is not working correctly. Could you check that it is working with this:

import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code)  # this will take a minute
y = model.sampling(n_jobs=1).extract()['y']
y.mean()  # should be close to 0

I have personally found that it is a big pain to get PyStan working in Windows, and have only been able to do it successfully using Anaconda. In Anaconda, you can install fbprophet from conda forge like described here:
https://facebook.github.io/prophet/docs/installation.html

Thanks so much!!!!

I will check it.

Ben Letham notifications@github.com 于2018年11月13日周二 上午8:17写道:

It seems that Stan is not working correctly. Could you check that it is
working with this:

import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code) # this will take a minute
y = model.sampling(n_jobs=1).extract()['y']
y.mean() # should be close to 0

I have personally found that it is a big pain to get PyStan working in
Windows, and have only been able to do it successfully using Anaconda. In
Anaconda, you can install fbprophet from conda forge like described here:
https://facebook.github.io/prophet/docs/installation.html


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/facebook/prophet/issues/732#issuecomment-438048686,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZyExPltH60W2NxSc3kFAOzskmxYlfqLks5uufRMgaJpZM4YXx21
.

I am suffering seriously because of this pystan problem for a very long time. Please help me out with this.

import pystan
Traceback (most recent call last):
File "", line 1, in
File "C:\PYTHON\lib\site-packages\pystan_init_.py", line 9, in
from pystan.api import stanc, stan
File "C:\PYTHON\lib\site-packages\pystanapi.py", line 13, in
import pystan._api # stanc wrapper
ImportError: DLL load failed: %1 is not a valid Win32 application.

@oliesen5 I was getting that message while trying to install from pip alone on Windows. It's not going to happen, unfortunately; you really need conda for this one. After installing miniconda 3.7, these instructions got me there. I had RStan working fine and I assumed I could tap into the RTools mingw-w64 compiler, but no deal.

Update: it's the next day and after all that fun getting pystan installed, I ended up starting with a clean environment and running conda install -c conda-forge fbprophet, which did everything. (I created a dependency problem for conda in the previous environment.)

This will disable temporarly your ssl verify but reactivate it after just to be sure

conda config --set ssl_verify false
conda install -c conda-forge fbprophet
conda config --set ssl_verify true

Was this page helpful?
0 / 5 - 0 ratings