LoginSignup
12
18

More than 5 years have passed since last update.

Windows 10 に scikit-learn をインストールしてみる

Posted at

Windows 10 Pro (64bit) に scikit-learn をインストールしたので、そのときの手順を記録しておきます。

やること

Win10 に scikit-learn とそれに必要なライブラリ群をインストールし、動作確認をします。

インストールするパッケージ

順に以下のとおりです。
1. Python 3.5.1 (64bit版)
2. wheel
3. numpy
4. scipy
5. scikit-learn
6. pandas

インストールしてみる

Python をインストール

Python のダウンロードページから "Windows x86-64 executable installer" をダウンロードして、インストールします。"Add Python to environment variables" にチェックを入れてインストールしてください。
https://www.python.org/

Wheel のインストール

Wheel形式のパッケージをインストールできるようにします。
Windows のコマンドプロンプトを起動して、下記コマンドを実行します。

pip install wheel

numpy, scipy の Wheel 形式パッケージをダウンロードしてインストール

numpy は下記URLの "numpy-1.11.0+mkl-cp35-cp35m-win_amd64.whl" をダウンロードします。
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

scipy は下記URLの "scipy-0.17.1-cp35-cp35m-win_amd64.whl" をダウンロードします。
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

pip install C:\Users\<PathToFile>\numpy-1.11.0+mkl-cp35-cp35m-win_amd64.whl
pip install C:\Users\<PathToFile>\scipy-0.17.1-cp35-cp35m-win_amd64.whl

scikit-learn, matplotlib, pandas をインストール

お目当ての scikit-learn とそれに必要な グラフ描画パッケージ matplotlib, データ解析パッケージ pandas をそれぞれインストールします。

pip install scikit-learn
pip install matplotlib
pip install pandas

動作確認

インストールが一通り終わったので、scikit-learn がちゃんと動くか確認します。下記URLに scikit-learn のサンプルコードがあるので、"plot_multioutput_face_completion.py" をダウンロードします。

そしたら、早速実行。

python <PathToFIle>\plot_multioutput_face_completion.py

しばらくしてこんな結果が表示されたらOKかな。

faces.png

以上です。

12
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
18