ubuntu 環境下搭建 scikit-learn 環境

1. Scikit-learn requires

  1. Python (>= 2.6 or >= 3.3),
  2. NumPy (>= 1.6.1),
  3. 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:

這裏寫圖片描述

這裏寫圖片描述

3. Done

發佈了72 篇原創文章 · 獲贊 26 · 訪問量 31萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章