1.安裝依賴
在terminal里面直接輸入以下命令,這個命令會安裝sklearn所需要的依賴,主要包括 scipy, numpy一些主流依賴。
sudo apt-get install build-essential python-dev python-numpy python-setuptools python-scipy libatlas-dev libatlas3-base
2.可選安裝
安裝畫圖依賴包 matplotlib,這個包基本上都會用到
sudo apt-get install python-matplotlib
3.安裝sklearn
pip install -U scikit-learn