簡體   English   中英

無法從 sklearn.ensemble 導入任何內容

[英]Cannot import anything from sklearn.ensemble

from sklearn.ensemble._forest import VotingClassifier
from sklearn.ensemble import RandomForestRegressor

當我嘗試從 ensemble 導入任何東西時,總是會出現如下錯誤:

追溯

我試過了

pip install -U scikit-learn
conda install -c conda-forge scikit-learn 

不要將 conda 與 pip 混合使用。

嘗試以下步驟:

  1. pip uninstall sklearn然后pip install -U scikit-learn

  2. 代替

    from sklearn.ensemble._forest import VotingClassifier

    from sklearn.ensemble import VotingClassifier

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM