Error while importing sklearn.externals.six import StringIO for decision tree visualization

Hi, I am getting the following error
from sklearn.externals.six import StringIO
ModuleNotFoundError: No module named ‘sklearn.externals.six’

In the code used in video this is not giving an error. Kindly suggest what to be done

hey @sanandasaha3 ,
sklearn.externals.six module was deleted from sklearn package in sklearn version 0.23 . So, if you want to use it , then you need to downgrade your sklearn module version to lower versions 0.22 or 0.20.1 .

I hope it will work .
Thank You.

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.