Prophet: failed install prophet on centos 7

Created on 18 Aug 2019  路  2Comments  路  Source: facebook/prophet

hi,
my environment:

centos 7, python 3.6.5. when install prophet from source, it failed and report error below:

$ sudo python3 setup.py install -v
running install
running bdist_egg
running egg_info
creating fbprophet.egg-info
writing fbprophet.egg-info/PKG-INFO
writing dependency_links to fbprophet.egg-info/dependency_links.txt
writing requirements to fbprophet.egg-info/requires.txt
writing top-level names to fbprophet.egg-info/top_level.txt
writing manifest file 'fbprophet.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'fbprophet/stan_model'
writing manifest file 'fbprophet.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
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_888a84912910fa0a45b9d614b75bb8a8 NOW.

error: command 'gcc' failed with exit status 1

I had tried with command "sudo pip3 install prophet", it failed similarly:

ERROR: Command errored out with exit status 1:
 command: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iyf_xywp/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iyf_xywp/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-lz2x5pxz/install-record.txt --single-version-externally-managed --compile
     cwd: /tmp/pip-install-iyf_xywp/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_861b75c6337e237650a61ae58c4385ef NOW.
error: command 'gcc' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iyf_xywp/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iyf_xywp/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-lz2x5pxz/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

I separately install other dependencies, such as pystan 2.19, success and it works well.

thanks.

Most helpful comment

after upgrade gcc version with below command on centos 7:
yum install centos-release-scl
yum-config-manager --enable rhel-server-rhscl-7-rpms
yum install devtoolset-7
scl enable devtoolset-7 bash

then it passed install fbprophet
sudo pip3 install fbprophet

All 2 comments

after upgrade gcc version with below command on centos 7:
yum install centos-release-scl
yum-config-manager --enable rhel-server-rhscl-7-rpms
yum install devtoolset-7
scl enable devtoolset-7 bash

then it passed install fbprophet
sudo pip3 install fbprophet

after upgrade gcc version with below command on centos 7:
yum install centos-release-scl
yum-config-manager --enable rhel-server-rhscl-7-rpms
yum install devtoolset-7
scl enable devtoolset-7 bash

then it passed install fbprophet
sudo pip3 install fbprophet

Great, It worked for me

My environment is :

Linux iZ2zednt5l0dq8ugb5hol0Z 3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

CentOS Linux release 7.7.1908 (Core)

Python 3.6.8 (default, Aug 7 2019, 17:28:10)

gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

datafool picture datafool  路  3Comments

ChaymaeHarfoush picture ChaymaeHarfoush  路  3Comments

annabednarska picture annabednarska  路  3Comments

andrew-pollock picture andrew-pollock  路  3Comments

sriramkraju picture sriramkraju  路  3Comments