Closed emrenak closed 3 years ago
It looks like something isn't working in the C++ toolchain. A simple way to verify that is to try to run this pystan code:
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
It looks like you have the python3-devel. I've also seen gcc64 and gcc64-c++ come up as necessary packages in red hat linux.
Some other things to check that may be helpful: #1403, #846, #326
Tried to execute to code above as well. Any ideas ?
INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_5944b02c79788fa0db5b3a93728ca2bf NOW. Traceback (most recent call last): File "/usr/lib64/python3.6/distutils/unixccompiler.py", line 127, in _compile extra_postargs) File "/usr/lib64/python3.6/distutils/ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "/usr/lib64/python3.6/distutils/spawn.py", line 36, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/usr/lib64/python3.6/distutils/spawn.py", line 159, in _spawn_posix % (cmd, exit_status)) distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 3, in
Yeah so there is definitely something still missing in the C++ toolchain, or the machine does not have enough RAM. Did you try the things described in the other issues?
yes, tried, especially the one #1403, this one is very familiar with my problem. btw the server has 16 gb ram.
MemTotal: 16231480 kB
I don't think I have any ideas beyond what is described in the issues above, sorry. The only other thing I might try would be to downgrade pystan to 2.18.1, but that's a real shot in the dark. I think your best bet would be to ask over at Pystan if they have an idea of what's going on.
Did you solve this? I am having the same issue!
Did you solve this? I am having the same issue!
No, unfortunately could not solve it.
Hey,
I had this problem also but i've managed to make it work with the following workaround.
Before installing fbprophet you have to install pystan.
However if you will install like this -> pip install pystan it will fail at building fbprophet because it will grab version 2.19.. that is not compatible with GCC version.
Solution:
pip install pystan==2.18.0.0
pip install fbprophet
Trying to install fbprophet on RHEL 8. Already installed gcc and python dev tools, however compiling fails.
I'm using pystan pystan-2.19.1.1
gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5) Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[]$ python3 --version Python 3.6.8
[]# yum install python3-devel Updating Subscription Management repositories. This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions. Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support (RPMs) 18 kB/s | 2.4 kB 00:00 Red Hat Enterprise Linux 8 for x86_64 - AppStream - Extended Update Support (RPMs) 21 kB/s | 2.8 kB 00:00 Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 (RPMs) 16 kB/s | 2.1 kB 00:00 Package python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete!
[]$ pip3 install fbprophet --user
Requirement already satisfied: Cython>=0.22 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: cmdstanpy==0.9.5 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: pystan>=2.14 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: numpy>=1.15.4 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: pandas>=1.0.4 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: matplotlib>=2.0.0 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: LunarCalendar>=0.0.9 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: convertdate>=2.1.2 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: holidays>=0.10.2 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: setuptools-git>=1.2 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: python-dateutil>=2.8.0 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: tqdm>=4.36.1 in ./.local/lib/python3.6/site-packages (from fbprophet) Requirement already satisfied: pytz>=2017.2 in /usr/lib/python3.6/site-packages (from pandas>=1.0.4->fbprophet) Requirement already satisfied: pillow>=6.2.0 in ./.local/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /usr/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) Requirement already satisfied: cycler>=0.10 in ./.local/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) Requirement already satisfied: kiwisolver>=1.0.1 in ./.local/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) Requirement already satisfied: ephem>=3.7.5.3 in ./.local/lib/python3.6/site-packages (from LunarCalendar>=0.0.9->fbprophet) Requirement already satisfied: pymeeus<=1,>=0.3.6 in ./.local/lib/python3.6/site-packages (from convertdate>=2.1.2->fbprophet) Requirement already satisfied: six in /usr/lib/python3.6/site-packages (from holidays>=0.10.2->fbprophet) Requirement already satisfied: korean_lunar_calendar in ./.local/lib/python3.6/site-packages (from holidays>=0.10.2->fbprophet) Installing collected packages: fbprophet Running setup.py install for fbprophet ... error Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pip-build-g90u7vaj/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-op19icq6-record/install-record.txt --single-version-externally-managed --compile --user --prefix=: running install running build running build_py creating build creating build/lib creating build/lib/fbprophet creating build/lib/fbprophet/stan_model Importing plotly failed. Interactive plots will not work. INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_dfdaf2b8ece8a02eb11f050ec701c0ec NOW. error: command 'gcc' failed with exit status 1
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pip-build-g90u7vaj/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-op19icq6-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-g90u7vaj/fbprophet/