1

I am using 3.10 version of python and while running pycaret.classification i am getting below error.

      1 #init setup
----> 3 from pycaret.classification import *
      4 s = setup(data, target ='Resolver',session_id=123)
      6 #train model


ImportError: cannot import name 'Iterable' from 'collections'

Note: I tried using collections.abc import Iterable in my script, but it is not working.

wkl
  • 77,184
  • 16
  • 165
  • 176
  • Does this answer your question? [ImportError: cannot import name 'Iterable' from 'collections' in Python](https://stackoverflow.com/questions/72032032/importerror-cannot-import-name-iterable-from-collections-in-python) – DialFrost Aug 04 '22 at 05:05
  • `pycaret` doesn't officiallly support Python 3.10 - use versions 3.7-3.9. – wkl Aug 04 '22 at 05:17

1 Answers1

0

The Iterable abstract class was removed from collections in Python 3.10, so it will result in an error trying to import it. If using Iterable from collections.abc doesn't work, you can try downgrading to Python 3.9 and try again.

DialFrost
  • 1,610
  • 1
  • 8
  • 28