python:
from sklearn.metrics import mean_squared_error
錯誤提示:
from . import _iterative
ImportError: DLL load failed: 找不到指定的模塊。
在CSDN找到解決方案:
In case you are using the binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn. They require numpy-MKL,
( http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy ) as indicated on the download page.
The official numpy binaries won’t work.
即下載帶有MKL的WHL包,但使用pip install 安裝NUMPY包時又得到提示該WHL包與平臺不符,無法安裝,使用非MKL包安裝在導入SKLEARN時仍舊會出現import Error,在百度搜索了一下pip install mkl 發現知道上的一篇解答:
於是嘗試
python -m pip install –upgrade pip
再進行MKL包的安裝,發現WHL包安裝成功,導入SKLEARN庫也沒有錯誤了。