1
1

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.

Arch Linux に tensorflow をインストールする

Last updated at Posted at 2017-05-31

インストール方法

sudo pacman -S python-numpy
sudo pacman -S python-tensorflow

テストプログラム

tensorflow_test.py
# ! /usr/bin/python
# -*- coding: utf-8 -*-
#
#	tensorflow_test.py
#
#					Mar/20/2018
#
# ------------------------------------------------------------------
import sys
import tensorflow as tf
# ------------------------------------------------------------------
sys.stderr.write("*** 開始 ***\n")
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
data_out = sess.run(hello)
#
print(data_out)
print(data_out.decode('utf-8'))
#
sys.stderr.write("*** 終了 ***\n")
# ------------------------------------------------------------------

実行方法

./tensorflow_test.py

このプログラムを実行すると警告がでる
そこで、次のように環境変数を設定して実行すれば、
export TF_CPP_MIN_LOG_LEVEL=2
警告が出なくなる

次のバージョンで確認しました。

$ uname -a
Linux iwata 4.15.10-1-ARCH #1 SMP PREEMPT Thu Mar 15 12:24:34 UTC 2018 x86_64 GNU/Linux
$ python --version
Python 3.6.4
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?