Skip to content
Advertisement

cannot import name ‘delayed’ from ‘sklearn.utils.fixes’

How should the cannot import name 'delayed' from 'sklearn.utils.fixes be solved? I have already updated sklearn and upgraded conda as well.

~.condaenvsbase2libsite-packagessklearnmetricspairwise.py in <module>
         30 from ..utils._mask import _get_mask
         31 from ..utils.validation import _deprecate_positional_args
    ---> 32 from ..utils.fixes import delayed
         33 from ..utils.fixes import sp_version, parse_version
         34 
    
    ImportError: cannot import name 'delayed' from 'sklearn.utils.fixes'`

Advertisement

Answer

After the installation via pip install delayed and then restarting the kernel, the problem was solved.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement