Install the Python machine learning library TensorFlow on fedora23. What is TensorFlow?-Qiita
http://tensorflow.org/get_started/os_setup.md
According to, Python2.7 is required at this time.
Since fedora23 contains only Python3 by default, install Python2 series.
Install python-devel at the same time as it is needed to build numpy.
sudo dnf install python python-devel
2 and 3 systems can coexist.
$ python --version
Python 2.7.10
$ python3 --version
Python 3.4.3
If you get the following error, you need rpm-build.
gcc:error: /usr/lib/rpm/redhat/redhat-hardened-cc1:There is no such file or directory
Install rpm-build.
sudo dnf install rpm-build
Reference: ["mysql_config --cflags" does not work on fedora 21 --Ask Fedora: Community Knowledge Base and Support Forum](https://ask.fedoraproject.org/en/question/61075/mysql_config-cflags-does-not -work-on-fedora-21 /)
This is called a specs file and seems to be a file that determines the behavior at build time. Reference: Cat Research Institute-What is GCC specs
Here, install the version that uses only the CPU for calculation.
$ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
If you want to use GPU, you need CUDA SDK.
$ python
Python 2.7.10 (default, Sep 8 2015, 17:20:17)
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelism threads: 1
I tensorflow/core/common_runtime/local_session.cc:45] Local session inter op parallelism threads: 1
>>> print sess.run(hello)
Hello, TensorFlow!
Recommended Posts