prophet: install errors upon building wheel

I had fbprophet installed fine at the beginning of the day (it was running fine yesterday), but per issue #363 I hastily uninstalled it after I was getting errors when trying to pull data from BigQuery using pandas gbq. I tried re-installing fbprohpet, and now I’m unable to install it, due to issues building wheel. I’ve tried the fixes outlined in issues #201 and #499 but they don’t work for me, and I’m still having issues.

When I run

conda install -c conda-forge fbprophet

Everything seems to install fine, however when I start a session of python and attempt to import fbprophet, it errors out and says no module exists.

When I run:

pip install fbprophet

The output is the following:

  Using cached https://files.pythonhosted.org/packages/83/a1/a39be1675a62597e4c0d4fdaeb65b14752b8aa8afc92e90edd91614353ab/fbprophet-0.3.post2.tar.gz
Requirement already satisfied: Cython>=0.22 in ./anaconda3/lib/python3.6/site-packages (from fbprophet) (0.28.5)
Requirement already satisfied: pystan>=2.14 in ./anaconda3/lib/python3.6/site-packages (from fbprophet) (2.18.0.0)
Requirement already satisfied: numpy>=1.10.0 in ./anaconda3/lib/python3.6/site-packages (from fbprophet) (1.15.1)
Requirement already satisfied: pandas>=0.20.1 in ./anaconda3/lib/python3.6/site-packages (from fbprophet) (0.23.4)
Requirement already satisfied: matplotlib>=2.0.0 in ./anaconda3/lib/python3.6/site-packages (from fbprophet) (2.2.3)
Requirement already satisfied: pytz>=2011k in ./anaconda3/lib/python3.6/site-packages (from pandas>=0.20.1->fbprophet) (2018.4)
Requirement already satisfied: python-dateutil>=2.5.0 in ./anaconda3/lib/python3.6/site-packages (from pandas>=0.20.1->fbprophet) (2.7.3)
Requirement already satisfied: cycler>=0.10 in ./anaconda3/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./anaconda3/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (2.2.0)
Requirement already satisfied: six>=1.10 in ./anaconda3/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (1.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./anaconda3/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (1.0.1)
Requirement already satisfied: setuptools in ./anaconda3/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib>=2.0.0->fbprophet) (40.4.3)
Building wheels for collected packages: fbprophet
  Running setup.py bdist_wheel for fbprophet ... error
  Complete output from command /Users/tricia.scully/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-install-sosyjw4v/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-wheel-b0o81h9g --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/fbprophet
  creating build/lib/fbprophet/stan_model
  DIAGNOSTIC(S) FROM PARSER:
  Warning: left-hand side variable (name=cp_idx) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
  Warning: left-hand side variable (name=m_pr) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.

  INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_861b75c6337e237650a61ae58c4385ef NOW.
  error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for fbprophet
  Running setup.py clean for fbprophet
Failed to build fbprophet
Installing collected packages: fbprophet
  Running setup.py install for fbprophet ... error
    Complete output from command /Users/tricia.scully/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-install-sosyjw4v/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 /private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-record-zzklwiv6/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/fbprophet
    creating build/lib/fbprophet/stan_model
    DIAGNOSTIC(S) FROM PARSER:
    Warning: left-hand side variable (name=cp_idx) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
    Warning: left-hand side variable (name=m_pr) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.

    INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_861b75c6337e237650a61ae58c4385ef NOW.
    error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1

    ----------------------------------------
Command "/Users/tricia.scully/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-install-sosyjw4v/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 /private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-record-zzklwiv6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-install-sosyjw4v/fbprophet/ ```

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 26 (7 by maintainers)

Most upvoted comments

Use Conda command :

conda install -c conda-forge fbprophet

This will create a wheel and update environment necessary for the package. pip install fbprophet will create similar issue.

Same issue - any progress?

Finally a friend who is way more knowledgeable than me solve the issue. I am not sure what exactly solved the problem but I think he installed mingw instead of GCC (after installing Visual Studio). It was still not working. Then we uninstalled PyStan and the Numpy and Cythan packages. And, instead of re-installing them before installing PyStan. We just installed PyStan which took all the necessary packages at the same time. Maybe there was a version problem when you get them before PyStan? No idea but everything works now and I am more than happy!

@14mprb if conda install gcc is not working then the C++ compiler is probably not installed and so fbprophet will not work. In fact, I would be surprised if pystan works, despite having installed. Can you check 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

The right place to debug would be the error with conda install gcc. What error are you seeing there?