question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fbprophet install failed

See original GitHub issue

Hi. I am working under AWS sagemaker Python3 kernel. When I tried to install fbprophet, I had such errors:

  Building wheel for fbprophet (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ec2-user/anaconda3/envs/python3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mt9_nyot/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mt9_nyot/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 /tmp/pip-wheel-i65e_ydl
       cwd: /tmp/pip-install-mt9_nyot/fbprophet/
  Complete output (44 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/fbprophet
  creating build/lib/fbprophet/stan_model
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-mt9_nyot/fbprophet/setup.py", line 149, in <module>
      long_description_content_type='text/markdown',
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-mt9_nyot/fbprophet/setup.py", line 48, in run
      build_models(target_dir)
    File "/tmp/pip-install-mt9_nyot/fbprophet/setup.py", line 36, in build_models
      from fbprophet.models import StanBackendEnum
    File "/tmp/pip-install-mt9_nyot/fbprophet/fbprophet/__init__.py", line 8, in <module>
      from fbprophet.forecaster import Prophet
    File "/tmp/pip-install-mt9_nyot/fbprophet/fbprophet/forecaster.py", line 17, in <module>
      from fbprophet.make_holidays import get_holiday_names, make_holidays_df
    File "/tmp/pip-install-mt9_nyot/fbprophet/fbprophet/make_holidays.py", line 14, in <module>
      import fbprophet.hdays as hdays_part2
    File "/tmp/pip-install-mt9_nyot/fbprophet/fbprophet/hdays.py", line 17, in <module>
      from holidays import WEEKEND, HolidayBase, Turkey
  ImportError: cannot import name 'Turkey'
  ----------------------------------------
  ERROR: Failed building wheel for fbprophet
  Running setup.py clean for fbprophet
Failed to build fbprophet
Installing collected packages: cmdstanpy, holidays, fbprophet
  Attempting uninstall: cmdstanpy
    Found existing installation: cmdstanpy 0.4.0
    Uninstalling cmdstanpy-0.4.0:
      Successfully uninstalled cmdstanpy-0.4.0
  Attempting uninstall: holidays
    Found existing installation: holidays 0.9.11
    Uninstalling holidays-0.9.11:
      Successfully uninstalled holidays-0.9.11
    Running setup.py install for fbprophet ... error
    ERROR: Command errored out with exit status 1:
     command: /home/ec2-user/anaconda3/envs/python3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mt9_nyot/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mt9_nyot/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 /tmp/pip-record-b2so_arv/install-record.txt --single-version-externally-managed --compile --install-headers /home/ec2-user/anaconda3/envs/python3/include/python3.6m/fbprophet
         cwd: /tmp/pip-install-mt9_nyot/fbprophet/
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/fbprophet
    creating build/lib/fbprophet/stan_model
    INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_dfdaf2b8ece8a02eb11f050ec701c0ec NOW.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ec2-user/anaconda3/envs/python3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mt9_nyot/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mt9_nyot/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 /tmp/pip-record-b2so_arv/install-record.txt --single-version-externally-managed --compile --install-headers /home/ec2-user/anaconda3/envs/python3/include/python3.6m/fbprophet Check the logs for full command output.

Hope someone can give me some clues. Thanks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
iraseidmancommented, Jul 5, 2021

After spending hours scouring the internet for answers to this question and similar questions like “ERROR: Command errored out with exit status 1: when installing “Facebook” “prophet”” what worked for me was quite simply using a sudo pip install at the terminal prompt:

$ sudo pip install pystan==2.19.1.1 prophet

After install using prophet instead of fbprophet:

from prophet import Prophet

Credit to GitHub issue 1874 - https://github.com/facebook/prophet/issues/1874

0reactions
blethamcommented, Sep 24, 2020

The specific set of packages depends on the distro, but see the Linux section in https://facebook.github.io/prophet/docs/installation.html#python for some ideas.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fbprophet installation error - failed building wheel for fbprophet
Step 1: Check the kernel in jupyter. Locate the folder \jupyter\kernels\python3 and check the python exe location used by the kernel. Mine was ......
Read more >
error when running pip install fbprophet #1775 - GitHub
Hi, I tried to run pip install fbprophet on docker: FROM public.ecr.aws/lambda/python:3.8 RUN pip --no-cache-dir install \ ephem \ pystan ...
Read more >
Unable to install pystan & fbprophet - Dataiku Community
Solved: I tried installing "pystan" and fbprophet by mentioning them in the "Code envs" section. When I click on "Save and.
Read more >
Cant install python package fbprophet - pystan failing? - Replit
Pystan 2.19.1.1 is required for fbprophet and cannot be installed due to compile error. Possible solution is to install python-dev package, but it's...
Read more >
Fixing error fbprophet | Data Science and Machine Learning
I'm facing some error to pip install fbprophet. Does anyone know how to fix this error? ** ERROR: Command errored out with exit...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found