0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Raspberry PiへTensoflow/KerasのInstall

Last updated at Posted at 2019-10-15

環境

2019/10/15現在
Raspberry Pi 3B
Raspbian Strech

インストール

前準備

$ sudo apt-get install git gcc make openssl python3-dev
$ sudo apt-get install libssl-dev libbz2-dev libreadline-dev libsqlite3-dev
$ sudo apt-get install tk-dev python-tk libfreetype6-dev
$ sudo apt-get install pkg-config libjpeg8-dev libpng12-dev
$ sudo apt-get install python3-numpy python3-scipy python3-matplotlib python3-h5py

TensorFlow

インストールする

$ pip3 install tensorflow

Collecting tensorflow
  Downloading https://www.piwheels.org/simple/tensorflow/tensorflow-1.14.0-cp35-none-linux_armv7l.whl (100.7MB)
    47% |███████████████▎                | 48.0MB 5.4kB/s eta 2:43:30
THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    tensorflow from https://www.piwheels.org/simple/tensorflow/tensorflow-1.14.0-cp35-none-linux_armv7l.whl#sha256=cba22b6d9a3e7a92c07e142bd5256c9773fd20c18090cb1d222357d3b3028655:
        Expected sha256 cba22b6d9a3e7a92c07e142bd5256c9773fd20c18090cb1d222357d3b3028655
             Got        deee69199d8775d6d809b0f45c50d7f2ba88f181552e93db1180dfcd5e659929

→エラーする

調べると直接whlを落としてきてinstallすると良いとのこと

再度インストール

$ wget https://www.piwheels.org/simple/tensorflow/tensorflow-1.14.0-cp35-none-linux_armv7l.whl
$ pip3 install tensorflow-1.14.0-cp35-none-linux_armv7l.whl 

Tensorflow利用時にnumpyのエラーが発生する。
 - https://qiita.com/Tarooo000/items/dcce992672c7ea539049

# 以下で対応
$ pip3 install numpy==1.16.4

Keras

$ pip3 install keras

こちらは素直に入った

0
3
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
0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?