Python 機械学習プログラミング を始める準備(for macOS)
(2017.01.09 OSX El Capitan)
Homebrew
Homebrew がインストールされていない場合、
http://brew.sh/index_ja.html にしたがって Homebrew をインストール
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Python3
Python3 を Homebrew でインストール
brew install python3
numpy, scipy, pandas, sklearn
pip で numpy, scipy, pandas, sklearn をインストール
pip3 install numpy scipy pandas sklearn
matplotlib
http://qiita.com/ciela/items/32703d8dc6dd2297cc99 を参考に、
pkg-config, freetype を Homebrew でインストールしてから、pip で matplotlib をインストール
brew install pkg-config freetype
pip3 install matplotlib
Sample code
サンプルコード をダウンロード
Jyupyter
http://jupyter.org/install.html を参考に、pip で Jupyter をインストール
pip3 install jupyter
Jupyter extension
pip で Jupyter の拡張パッケージをインストール
pip3 install watermark
Jyupyter の起動
Jupyter の起動は、ターミナルで以下を入力する
jupyter notebook
Jupyter の動作確認
ダウンロードしたサンプルコードのフォルダへ移動して、
code/ch02/ch02.ipynb などのファイルを開き、ページ上部のメニューの Kernel タブをクリックして、
Restart & Run All をクリックする