Eulises Valdovinos
Eulises Valdovinos

Reputation: 21

Failed building wheel for fbprophet in Jupyter Notebook

I am trying to install fbprophet in Jupyter Notebook using !pip install fbprophet.

I already have pystan and Microsoft Visual Studio

Below is the error I get

Failed building wheel for fbprophet Command "C:\Users\evaldovi\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\evaldovi\AppData\Local\Temp\pip-install-e2tuxpri\fbprophet\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\evaldovi\AppData\Local\Temp\pip-record-yijav0j4\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\evaldovi\AppData\Local\Temp\pip-install-e2tuxpri\fbprophet\

Upvotes: 1

Views: 5033

Answers (1)

AnkushRasgon
AnkushRasgon

Reputation: 820

Usually the source of this issue is that PyStan is not working due to the C++ compiler not working properly.
You can check if PyStan is working with

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

The install is a little more complicated with Anaconda because it has a separate build environment from system python. The easiest way to install fbprophet in Anaconda is through conda forge:

conda install gcc
conda install -c conda-forge fbprophet

Upvotes: 2

Related Questions