Comments (15)
@jeffhandl Hi,
Please the attached screenshot for the error. It's quite strange. When I import TimeSeriesData, it works. But for importing any other functionalities, always failed.
from kats.
update
I found that when using "pip install kats”, do not use the mirror source. If you use the mirror source, there are no files in the installed kats package. It may be because kats is a new library.
I installed successfully using pip without a mirror source, although the speed is a bit slow.
FYI
from kats.
@YachaoDong @jeffhandl Aha, great man! It works! If i install kats from the original source, thing goes well! Thank you!
from kats.
How did you install it from the original source? I still can't seem to get it to work.
This may be useful.
pip install kats -i https://mirrors.aliyun.com/pypi/simple/
from kats.
Hi @davidguo-7,
Are you able to run this notebook from the tutorials? It has an example using OutlierDetector
in it.
from kats.
Hi @jeffhandl
Yes, I am taking reference from this tutorials. But the error message came out in the first step which imported the function. So, I can't follow the remaining tutorials!
from kats.
Hi @davidguo-7,
We are trying to understand how you are getting this error. Can you give us the sequence of steps that led to this error so we can reproduce it and try to solve it?
from kats.
Same error. Request an answer to this error.
from kats.
@YachaoDong @davidguo-7 Can you give me the steps that you used to install Kats?
from kats.
OS: Ubuntu20.04(WSL2 installed on WIN10)
Run on terminal:pip install kats
There was a problem when installing fbprohet:
`Building wheels for collected packages: kats, fbprophet, pymeeus
Building wheel for kats (setup.py) ... done
Created wheel for kats: filename=kats-0.1-py3-none-any.whl size=12801 sha256=39191ce50466739ce28f18dc5f2981f106b17aafc4c1d77fbc7323870496a969
Stored in directory: /home/yachao/.cache/pip/wheels/31/f0/a7/908cae32b26fddfc4e92836ffe83a964a5d0241db51dfccefa
Building wheel for fbprophet (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/yachao/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lopqhf8s/fbprophet/setup.py'"'"'; file='"'"'/tmp/pip-install-lopqhf8s/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-vt2s1rs9
cwd: /tmp/pip-install-lopqhf8s/fbprophet/
Complete output (40 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 "", line 1, in
File "/tmp/pip-install-lopqhf8s/fbprophet/setup.py", line 149, in
long_description_content_type='text/markdown',
File "/home/yachao/miniconda3/lib/python3.7/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/yachao/miniconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/yachao/miniconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/yachao/miniconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/yachao/miniconda3/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 290, in run
self.run_command('build')
File "/home/yachao/miniconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/yachao/miniconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/yachao/miniconda3/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/yachao/miniconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/yachao/miniconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-lopqhf8s/fbprophet/setup.py", line 48, in run
build_models(target_dir)
File "/tmp/pip-install-lopqhf8s/fbprophet/setup.py", line 36, in build_models
from fbprophet.models import StanBackendEnum
File "/tmp/pip-install-lopqhf8s/fbprophet/fbprophet/init.py", line 8, in
from fbprophet.forecaster import Prophet
File "/tmp/pip-install-lopqhf8s/fbprophet/fbprophet/forecaster.py", line 14, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'
ERROR: Failed building wheel for fbprophet`
So I reinstalled fbprohet and kasts, and the installation was successful. This error appears when I run python to import kats:
>>> import kats Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/yachao/miniconda3/lib/python3.7/site-packages/kats/__init__.py", line 2, in <module> from . import utils # noqa ImportError: cannot import name 'utils' from 'kats' (/home/yachao/miniconda3/lib/python3.7/site-packages/kats/__init__.py)
I used conda to create another virtual environment. The same error occurs after installation and operation.
>>> import kats Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/yachao/miniconda3/envs/dong/lib/python3.8/site-packages/kats/__init__.py", line 2, in <module> from . import utils # noqa ImportError: cannot import name 'utils' from partially initialized module 'kats' (most likely due to a circular import) (/home/yachao/miniconda3/envs/dong/lib/python3.8/site-packages/kats/__init__.py)
Thank you for paying attention to this problem and solving this error!
from kats.
@jeffhandl Hi, I installed the Kats via Anaconda Pip
(base) C:\Users\49683>pip uninstall kats
Found existing installation: kats 0.1
Uninstalling kats-0.1:
Would remove:
c:\users\49683\anaconda3\lib\site-packages\kats-0.1.dist-info*
c:\users\49683\anaconda3\lib\site-packages\kats*
Proceed (Y/n)? y
Successfully uninstalled kats-0.1
(base) C:\Users\49683>pip install kats
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting kats
Using cached kats-0.1-py3-none-any.whl
Requirement already satisfied: pymannkendall>=1.4.1 in c:\users\49683\anaconda3\lib\site-packages (from kats) (1.4.2)
Requirement already satisfied: plotly>=4.14.3 in c:\users\49683\anaconda3\lib\site-packages (from kats) (5.1.0)
Requirement already satisfied: gpytorch in c:\users\49683\anaconda3\lib\site-packages (from kats) (1.5.0)
Requirement already satisfied: python-dateutil>=2.8.0 in c:\users\49683\anaconda3\lib\site-packages (from kats) (2.8.1)
Requirement already satisfied: ax-platform in c:\users\49683\anaconda3\lib\site-packages (from kats) (0.2.0)
Requirement already satisfied: matplotlib>=2.0.0 in c:\users\49683\anaconda3\lib\site-packages (from kats) (3.3.4)
Requirement already satisfied: fbprophet==0.7 in c:\users\49683\anaconda3\lib\site-packages (from kats) (0.7)
Requirement already satisfied: tqdm>=4.36.1 in c:\users\49683\anaconda3\lib\site-packages (from kats) (4.59.0)
Requirement already satisfied: convertdate>=2.1.2 in c:\users\49683\anaconda3\lib\site-packages (from kats) (2.3.2)
Requirement already satisfied: scikit-learn>+0.24.2 in c:\users\49683\anaconda3\lib\site-packages (from kats) (0.24.1)
Requirement already satisfied: torch>=1.8.1 in c:\users\49683\anaconda3\lib\site-packages (from kats) (1.9.0)
Requirement already satisfied: numba>=0.52.0 in c:\users\49683\anaconda3\lib\site-packages (from kats) (0.53.1)
Requirement already satisfied: pystan==2.19.1.1 in c:\users\49683\anaconda3\lib\site-packages (from kats) (2.19.1.1)
Requirement already satisfied: setuptools-git>=1.2 in c:\users\49683\anaconda3\lib\site-packages (from kats) (1.2)
Requirement already satisfied: holidays>=0.10.2 in c:\users\49683\anaconda3\lib\site-packages (from kats) (0.11.1)
Requirement already satisfied: LunarCalendar>=0.0.9 in c:\users\49683\anaconda3\lib\site-packages (from kats) (0.0.9)
Requirement already satisfied: attrs>=21.2.0 in c:\users\49683\anaconda3\lib\site-packages (from kats) (21.2.0)
Requirement already satisfied: pandas>=1.0.4 in c:\users\49683\anaconda3\lib\site-packages (from kats) (1.2.4)
Requirement already satisfied: statsmodels>=0.12.2 in c:\users\49683\anaconda3\lib\site-packages (from kats) (0.12.2)
Requirement already satisfied: seaborn>=0.11.1 in c:\users\49683\anaconda3\lib\site-packages (from kats) (0.11.1)
Requirement already satisfied: numpy>=1.15.4 in c:\users\49683\anaconda3\lib\site-packages (from kats) (1.19.5)
Requirement already satisfied: Cython>=0.22 in c:\users\49683\anaconda3\lib\site-packages (from fbprophet==0.7->kats) (0.29.21)
Requirement already satisfied: cmdstanpy==0.9.5 in c:\users\49683\anaconda3\lib\site-packages (from fbprophet==0.7->kats) (0.9.5)
Requirement already satisfied: pytz>=2014.10 in c:\users\49683\anaconda3\lib\site-packages (from convertdate>=2.1.2->kats) (2021.1)
Requirement already satisfied: pymeeus<=1,>=0.3.13 in c:\users\49683\anaconda3\lib\site-packages (from convertdate>=2.1.2->kats) (0.5.10)
Requirement already satisfied: korean-lunar-calendar in c:\users\49683\anaconda3\lib\site-packages (from holidays>=0.10.2->kats) (0.2.1)
Requirement already satisfied: six in c:\users\49683\anaconda3\lib\site-packages (from holidays>=0.10.2->kats) (1.15.0)
Requirement already satisfied: hijri-converter in c:\users\49683\anaconda3\lib\site-packages (from holidays>=0.10.2->kats) (2.1.3)
Requirement already satisfied: ephem>=3.7.5.3 in c:\users\49683\anaconda3\lib\site-packages (from LunarCalendar>=0.0.9->kats) (4.0.0.2)
Requirement already satisfied: cycler>=0.10 in c:\users\49683\anaconda3\lib\site-packages (from matplotlib>=2.0.0->kats) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in c:\users\49683\anaconda3\lib\site-packages (from matplotlib>=2.0.0->kats) (2.4.7)
Requirement already satisfied: pillow>=6.2.0 in c:\users\49683\anaconda3\lib\site-packages (from matplotlib>=2.0.0->kats) (8.2.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\49683\anaconda3\lib\site-packages (from matplotlib>=2.0.0->kats) (1.3.1)
Requirement already satisfied: llvmlite<0.37,>=0.36.0rc1 in c:\users\49683\anaconda3\lib\site-packages (from numba>=0.52.0->kats) (0.36.0)
Requirement already satisfied: setuptools in c:\users\49683\anaconda3\lib\site-packages (from numba>=0.52.0->kats) (52.0.0.post20210125)
Requirement already satisfied: tenacity>=6.2.0 in c:\users\49683\anaconda3\lib\site-packages (from plotly>=4.14.3->kats) (8.0.1)
Requirement already satisfied: scipy in c:\users\49683\anaconda3\lib\site-packages (from pymannkendall>=1.4.1->kats) (1.6.2)
Requirement already satisfied: joblib>=0.11 in c:\users\49683\anaconda3\lib\site-packages (from scikit-learn>+0.24.2->kats) (1.0.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\49683\anaconda3\lib\site-packages (from scikit-learn>+0.24.2->kats) (2.1.0)
Requirement already satisfied: patsy>=0.5 in c:\users\49683\anaconda3\lib\site-packages (from statsmodels>=0.12.2->kats) (0.5.1)
Requirement already satisfied: typing-extensions in c:\users\49683\anaconda3\lib\site-packages (from torch>=1.8.1->kats) (3.7.4.3)
Requirement already satisfied: typeguard in c:\users\49683\anaconda3\lib\site-packages (from ax-platform->kats) (2.12.1)
Requirement already satisfied: botorch==0.5.0 in c:\users\49683\anaconda3\lib\site-packages (from ax-platform->kats) (0.5.0)
Requirement already satisfied: jinja2 in c:\users\49683\anaconda3\lib\site-packages (from ax-platform->kats) (2.11.3)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\49683\anaconda3\lib\site-packages (from jinja2->ax-platform->kats) (1.1.1)
Installing collected packages: kats
Successfully installed kats-0.1
from kats.
@YachaoDong @davidguo-7 Can you give me the steps that you used to install Kats?
Then I re-created a conda virtual environment, and then ran the following steps:
conda install -c conda-forge fbprophet
pip install kats
python
<<from kats.consts import TimeSeriesData
<< from kats.models.prophet import ProphetModel, ProphetParams
error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/yachao/miniconda3/envs/ts/lib/python3.7/site-packages/kats/__init__.py", line 2, in <module> from . import utils # noqa ImportError: cannot import name 'utils' from 'kats' (/home/yachao/miniconda3/envs/ts/lib/python3.7/site-packages/kats/__init__.py)
from kats.
update
I found that the path is empty
miniconda3/envs/ts/lib/python3.7/site-packages/kats/
only two files init.py and consist.py
Then I copied other kats packages into it, but the error still appeared
`
from kats.consts import TimeSeriesData
Traceback (most recent call last):
File "", line 1, in
File "/home/yachao/miniconda3/envs/ts/lib/python3.7/site-packages/kats/init.py", line 8, in
from . import models # noqa
File "/home/yachao/miniconda3/envs/ts/lib/python3.7/site-packages/kats/models/init.py", line 12, in
from . import metalearner # noqa
File "/home/yachao/miniconda3/envs/ts/lib/python3.7/site-packages/kats/models/metalearner/init.py", line 5, in
from . import get_metadata # noqa
File "/home/yachao/miniconda3/envs/ts/lib/python3.7/site-packages/kats/models/metalearner/get_metadata.py", line 29, in
from kats.tsfeatures.tsfeatures import TsFeatures
File "/home/yachao/miniconda3/envs/ts/lib/python3.7/site-packages/kats/tsfeatures/init.py", line 5, in
from . import tsfeatures # noqa
File "/home/yachao/miniconda3/envs/ts/lib/python3.7/site-packages/kats/tsfeatures/tsfeatures.py", line 26, in
from deprecated import deprecated
ModuleNotFoundError: No module named 'deprecated'
`
from kats.
Awesome, @YachaoDong @davidguo-7 is this issue resolved then?
from kats.
How did you install it from the original source? I still can't seem to get it to work.
from kats.
Related Issues (20)
- Ax-Platform Issue HOT 1
- metalearner metadata error
- Hyper Parameter Tuning Explanation
- pip install kats fail HOT 22
- After installation on Databricks Error object.__init__() takes exactly one argument HOT 3
- Is it possible to "conda install kats"? HOT 1
- Anomaly detection in multivariate time series documentation benchmark
- Can't install Kats in Python 3.11, 3.10, 3.9
- Kats installation failure HOT 5
- KeyError: 'overall_anomaly_score' HOT 1
- kats 0.2.0 ax-platform dependency
- Tutorial 202 detection BOCPDetector parameter error HOT 1
- Issues on first use HOT 1
- Implementation of online/real time inference for detection of change point by bocpd
- pip install error for kats 0.2.0
- kats installation error HOT 13
- How can I set custom model parameters in GetMetaData?
- Kats installation failure due to Cython and numpy HOT 2
- Feature request: make pip installable with exclusion of fbprophet or any other pystan depender
- Unable to install Kats
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kats.