This article is about how to install TensorFlow binary package on Fedora Linux. I referred the install document for Ubuntu Linux on official page [1]
$ cat /etc/fedora-release Fedora release 27 (Twenty Seven) $ python3 --version Python 3.6.2 $ cd YOUR_PROJECT_DIR $ python3 -m venv ./venv $ source venv/bin/activate (venv) $ easy_install -U pip (venv) $ pip list Package Version ---------- ------- pip 10.0.1 setuptools 28.8.0 $ pip install --upgrade tensorflow (venv) $ pip list Package Version ----------- ----------- absl-py 0.2.0 astor 0.6.2 bleach 1.5.0 gast 0.2.0 grpcio 1.11.0 html5lib 0.9999999 Markdown 2.6.11 numpy 1.14.2 pip 10.0.1 protobuf 3.5.2.post1 setuptools 28.8.0 six 1.11.0 tensorboard 1.7.0 tensorflow 1.7.0 termcolor 1.1.0 Werkzeug 0.14.1 wheel 0.31.0
Run a script to verify.
(venv) $ python -c " import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() print(sess.run(hello)) " 2018-04-20 23:34:27.043810: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA b'Hello, TensorFlow!'
The warning is not to support CPU extension AVX [2] and FMA [3]. It is possible to suppress the warning by setting a environment variable according [4].
- [1] https://www.tensorflow.org/install/install_linux
- [2] AVX2: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#AVX2
- [3] FMA: https://en.wikipedia.org/wiki/Multiply%E2%80%93accumulate_operation#Fused_multiply%E2%80%93add
- [4] It is possible to suppress the warning by setting a environment variable according.