prophet icon indicating copy to clipboard operation
prophet copied to clipboard

Failed building wheel for fbprophet on AWS Notebook-Instances

Open marcmetz opened this issue 7 years ago • 4 comments

I know I am not the first one to write that, but I couldn't find any solution that worked for me yet. I use AWS Notebook-Instances and as template conda_python3 (python3.6). I already tried:

Terminal: conda install -c conda-forge fbprophet Notebook: !pip install fbprophet

However, I always receive an error Failed building wheel for fbprophet. Do you have any other idea who I could make this work?

marcmetz avatar Jul 14 '19 18:07 marcmetz

It would be helpful to see the whole traceback.

FelixKleineBoesing avatar Jul 17 '19 11:07 FelixKleineBoesing

The full message stack from the install would be very helpful. A few things to check: Did fbprophet actually install? Sometimes it will fail to build a wheel but will still install successfully, so check that fbprophet doesn't import. (What's happening in that case is that if pystan is not installed pip install will try to build a wheel before pystan is installed, which will not work. When that fails, pip will then fall back to installing dependencies and installing without a wheel, which usually works).

Does pystan work? Usually these types of build issues are related to pystan not functioning. Try running this code to see if it does:

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

If Pystan doesn't work, then make sure you have a C++ installer installed and python3 dev packages (see installation instructions). To use the latest version of pystan, you will also need a C++ compiler that supports C++14. Some older-but-still-in-use distros like CentOS7 do not support C++14 (see https://github.com/facebook/prophet/issues/1057). You will also need ~4Gb of RAM.

bletham avatar Jul 19 '19 23:07 bletham

I now switched completely to a local docker env. with this image here: https://github.com/jupyter/docker-stacks/tree/master/scipy-notebook

Works perfect.

marcmetz avatar Jul 31 '19 10:07 marcmetz

To install fbprophet on AWS Sagemaker Jupyter Notebook: !conda install -c plotly plotly==3.10.0 --yes !conda install -c conda-forge fbprophet --yes from fbprophet import Prophet Prophet()

amintapan avatar Aug 29 '19 13:08 amintapan