LoginSignup
0
1

More than 1 year has passed since last update.

ImportError: cannot import name 'extract_features' from 'tsfresh' (unknown location) で一生嵌った話

Last updated at Posted at 2023-01-20

tsfreshのextract_features関数をimportできずに一生嵌っていた。

環境
tsfresh==0.20.0, Python 3.9, Jupyter lab

from tsfresh.feature_extraction import extract_features

ImportError: cannot import name 'extract_features' from 'tsfresh' (unknown location)

のエラーがでてextract_features関数をimportできなかった。

を見てみると...

おい、extract_features関数があるの、feature_extractionディレクトリの下のextraction.pyじゃねーか!!

ということで、

from tsfresh.feature_extraction.extraction import extract_features

としたら無事importできた。ローカル環境ではfrom tsfresh.feature_extraction import extract_featuresでできたんだけどな、パッケージのPath系は謎が多くてしんどい。。。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1