当我尝试from sklearn.impute import KNNImputer
在 Jupyter Notebook 上加载时,出现以下错误。
ImportError: 无法从 'sklearn.impute' 导入名称 'KNNImputer' (C:\Users\aura-\Anaconda3\lib\site-packages\sklearn\impute_ init _.py)
我已经将sklearn更新到最新版本。
(base) C:\Users\aura->pip install -U scikit-learn Requirement already up-to-date: scikit-learn in c:\users\aura-\anaconda3\lib\site-packages (0.23.2)
但是当我再次检查 Jupyter Notebook 时import sklearn;print(sklearn.__version__)
,它仍然显示0.21.3
为什么更新没有反映在 Jupyter Notebook 上?
阿晨1998