1. Scikit-learn requires
- Python (>= 2.6 or >= 3.3),
- NumPy (>= 1.6.1),
- SciPy (>= 0.9).
注意在scikit-learn 官網中給出了這樣一段話:
We don’t recommend installing scipy or numpy using pip on linux, as this will involve a lengthy build-process with many dependencies. Without careful configuration, building numpy yourself can lead to an installation that is much slower than it should be….
由於之前安裝 numpy 使用的是 pip 工具,之後在安裝 scipy 和 scikit-learn 時出現很多依耐包不存在的問題,一個一個手動安裝之後還是出現其他的問題,還是未解決,希望高手指導下啊。
不過在 scikit-learn 官網找到了一個安裝的另一個方法:使用 conda !後來瞭解發現 Anaconda 是一個和Canopy類似的科學計算環境,但用起來更加方便。自帶的包管理器conda也很強大。便考慮搭建 Miniconda 環境,x86_64下載地址:Miniconda2-latest-Linux-x86_64.sh
2. 安裝 Scikit-learn
conda install scikit-learn
會同時下載所依耐的包:
下載安裝完成之後,打開 pycharm ,修改默認的 Project Interpreter: