LoginSignup
2
5

More than 5 years have passed since last update.

【ただのメモ】MacOSX SierraでKeras+TensorFlowが動くまで

Last updated at Posted at 2017-01-30

Pythonのインストール

$ brew install pyenv

下記を追加。

~/.bash_profile
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"

インストール可能なPythonのバージョンを確認。

$ pyenv install -l

3.6.0 をインストール.

$ xcode-select --install
$ pyenv install 3.6.0

使用するPythonのバージョンを 3.6.0 にする。

$ pyenv global 3.6.0

バージョン確認

$ python --version
Python 3.6.0

TensorFlowをインストール

今回はめんどうなのでvirtialenvは省略。

$ pip install tensorflow

Kerasをインストール

$ pip install keras

動作確認

kerasのレポジトリを git clone

$ git clone https://github.com/fchollet/keras.git

examples に移動して

$ cd keras/examples

mnist_cnn.py を実行してみる。

$ python mnist_cnn.py 

以上。

2
5
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
2
5