User program failed with ImportError: cannot import name '_joblib_parallel_args' from 'sklearn.utils.fixes' (/azureml-envs/azureml_39c082289e18c74c5b8523a75d2c0d1e/lib/python3.8/site-packages/sklearn/utils/fixes.py)
Anyone know why? Is there a workaround or a fix?
CodePudding user response:
The error shows that we are not able to import the '_joblib_parallel_args' from 'sklearn.utils.fixes'
To fix this issue follow below ways:
- Uninstall and install the latest version of scikit-learn
#uninstall sklearn
pip uninstall sklearn
#uninstall scikit-learn
pip uninstall scikit-learn
#install sklearn
pip install sklearn
- Update scikit-learn into latest version
# update the scikit-learn & sklearn
pip install --upgrade scikit-learn
- You can directly import the joblib don't want to get from 'sklearn.utils.fixes.
Instead of importing below format
from sklearn.utils.fixes import joblib
You can use
import joblib
Reference
CodePudding user response:
Try
pip uninstall scikit-learn
pip install scikit-learn==1.0.2