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.

Error installing fbprophet with python 3.6.3 on ubuntu 16.04

See original GitHub issue

I am trying to install fbprophet on ubuntu 16.04 with python 3.6.3… I tried pip3 install fbprophet but got an error:

    INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_1fdd477dd8bcc50395c4e25c8741f1c1 NOW.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Any idea what I am doing wrong?

Here’s the full trace log:

$ pip3 install fbprophet
Collecting fbprophet
  Using cached fbprophet-0.2.tar.gz
Requirement already satisfied: matplotlib in /home/dom/.local/lib/python3.6/site-packages (from fbprophet)
Requirement already satisfied: pandas>=0.18.1 in /home/dom/.local/lib/python3.6/site-packages (from fbprophet)
Requirement already satisfied: pystan>=2.14 in /home/dom/.local/lib/python3.6/site-packages (from fbprophet)
Requirement already satisfied: python-dateutil>=2.0 in /home/dom/.local/lib/python3.6/site-packages (from matplotlib->fbprophet)
Requirement already satisfied: cycler>=0.10 in /home/dom/.local/lib/python3.6/site-packages (from matplotlib->fbprophet)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/dom/.local/lib/python3.6/site-packages (from matplotlib->fbprophet)
Requirement already satisfied: six>=1.10 in /home/dom/.local/lib/python3.6/site-packages (from matplotlib->fbprophet)
Requirement already satisfied: numpy>=1.7.1 in /home/dom/.local/lib/python3.6/site-packages (from matplotlib->fbprophet)
Requirement already satisfied: pytz in /home/dom/.local/lib/python3.6/site-packages (from matplotlib->fbprophet)
Requirement already satisfied: Cython!=0.25.1,>=0.22 in /home/dom/.local/lib/python3.6/site-packages (from pystan>=2.14->fbprophet)
Building wheels for collected packages: fbprophet
  Running setup.py bdist_wheel for fbprophet ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d952l529/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/tmpdgkvpg9spip-wheel- --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_models
  INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_1fdd477dd8bcc50395c4e25c8741f1c1 NOW.
  error: command 'x86_64-linux-gnu-gcc' 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 /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d952l529/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-mik86vt3-record/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_models
    INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_1fdd477dd8bcc50395c4e25c8741f1c1 NOW.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d952l529/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-mik86vt3-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-d952l529/fbprophet/

Issue Analytics

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

github_iconTop GitHub Comments

15reactions
xiaoyongzhucommented, Mar 12, 2019

Just to comment on this issue - the gist is to install the python-dev that matches your python version. For example, I am using python 3.7 so I have to do sudo apt-get install python3.7-dev.

7reactions
jstammerscommented, Feb 1, 2018

I had the same issue and managed to resolve it by installing python3-dev. Even though I had python-dev installed, I suspect that it doesn’t contain the required headers for python3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Running setup.py install for fbprophet ... error
Use: The first step is to remove pystan and cache: pip uninstall fbprophet pystan pip --no-cache-dir install pystan==2.17 #any version pip ...
Read more >
Errors when installing Facebook Prophet - Dataiku Community
This error means that the C++ compiler isn't hooked up correctly to PyStan. Looks like you have CentOS/RHEL7 and the reason it isn't...
Read more >
conda install libstdc | The AI Search Engine You Control
After installing leidenalg with conda I got the following error: ... Created almost 5 years ago. 2. On Ubuntu 16.04.3 Anaconda version 1.6.5...
Read more >
Can't Seem To Install Fbprophet On Ubuntu 20.04 Visual ...
I am trying to install fbprophet on ubuntu 16.04 with python 3.6.3 I tried pip3 install fbprophet but got an error: INFO:pystan:COMPILING ...
Read more >
[Example code]-Installation Error for python-crfsuite on MacOS
but it throws an error. Building wheel for python-crfsuite (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Library/Frameworks/ ...
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