1

I use jupyter notebook and try to use pandas_ta library. However, I can't import it. the error show that "ModuleNotFoundError: No module named 'dataclasses'"

Please help me fix this.

image

Shayan Shafiq
  • 1,447
  • 5
  • 18
  • 25
NNN
  • 11
  • 1
  • 2

2 Answers2

0

Make sure that pandas_ta is installed. If not, run:

! pip install pandas-ta

Then, import pandas_ta.

It worked for me with Jupyter Notebook 6.4.5 and Python 3.8.8.

  • Hello, thanks for your advice. I try as your suggestion but the error still occur. I already install pandas-ta in my jupyter via pip install. The pandas-ta is also show when I check with 'pip list' in my jupyter. – NNN Nov 04 '21 at 01:39
  • I found someone [here](https://github.com/fastai/fastai/issues/867) with the same issue. It is possible that "dataclasses" is not fully installed. Try: `! pip install dataclasses` – Lluna Sanz Montrull Nov 04 '21 at 07:05
0

In case this is a current issue for anyone else, "import pandas_ta" didn't work for me. Instead I tried "import ta" and it worked.

qprez
  • 1
  • 2