facebookresearch / Kats

Kats, a kit to analyze time series data, a lightweight, easy-to-use, generalizable, and extendable framework to perform time series analysis, from understanding the key statistics and characteristics, detecting change points and anomalies, to forecasting future trends.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kats installation throws gcc error

psxpa3 opened this issue · comments

Hello,

I am trying to install Kats on Linux server, and while installing KATS getting error w.r.t fbprophet. The dependency tree that I could understood is KATs-> fbprophet -> Pystan -> gcc.

The default versions of that is being installed by KATS is 2.19.0.1 which is the reason that fbprophet is not being installed, and erroring out with this trace

"""
Requirement already satisfied: zipp>=3.1.0 in /usr/local/lib/python3.6/site-packages (from importlib-resources->tqdm>=4.36.1->kats) (3.6.0)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib64/python3.6/site-packages (from jinja2->ax-platform->kats) (2.0.1)
Using legacy 'setup.py install' for kats, since package 'wheel' is not installed.
Using legacy 'setup.py install' for fbprophet, since package 'wheel' is not installed.
Using legacy 'setup.py install' for gpytorch, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pymeeus, since package 'wheel' is not installed.
Installing collected packages: pymeeus, tenacity, pillow, korean-lunar-calendar, kiwisolver, hijri-converter, gpytorch, ephem, cycler, convertdate, setuptools-git, pystan, plotly, matplotlib, LunarCalendar, llvmlite, jinja2, holidays, cmdstanpy, botorch, seaborn, pymannkendall, numba, fbprophet, ax-platform, kats
Running setup.py install for pymeeus ... done
Running setup.py install for gpytorch ... done
Running setup.py install for fbprophet ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qwp7ohe8/fbprophet_448e98b19ac4433082176167ec40db97/setup.py'"'"'; file='"'"'/tmp/pip-install-qwp7ohe8/fbprophet_448e98b19ac4433082176167ec40db97/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-j3352f7m/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/fbprophet
cwd: /tmp/pip-install-qwp7ohe8/fbprophet_448e98b19ac4433082176167ec40db97/

Complete output (11 lines):
running install
/usr/local/lib/python3.6/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
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: /usr/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qwp7ohe8/fbprophet_448e98b19ac4433082176167ec40db97/setup.py'"'"'; file='"'"'/tmp/pip-install-qwp7ohe8/fbprophet_448e98b19ac4433082176167ec40db97/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-j3352f7m/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/fbprophet Check the logs for full command output.

"""

However, when I manually installed Pystan with this version 2.18.0.0, and then fbprophet 0.6 version could be installed manually. However, I do not know how while installing just kats other dependency specific versions can be specified. Could you please help me with the same. I have been trying it a lot, but have not gotten any progress.

Thank you very much for your help.

I am not sure about my fix, but : it seems like you are using python 3.6. Try using conda to create a virtual environment with python 3.7/3.8/3.9 and install kats in this environment. It worked for me with python 3.9 virtual env.

One thing I realised installation of kats in Windows is not possible. Therefore u need to create a virtual environment to resolve this thing. If u are installing kats with 'pip install kats', it was giving me error despite of successful installation. So I uninstalled it and later re-installed it directly from the source using the following command

'pip install kats -i https://mirrors.aliyun.com/pypi/simple/' .

May be this helps!