How to install Tensor Flow (deep learning software library) on Ubuntu (Debian based systems). These instructions were used to install on Lubuntu 16.04 LTS using Python 2.7.
First step is to install the following python libraries.
> apt-get install python-pip python-dev python-virtualenv
A virtual environment is used to install Tensor Flow. Create the virtual environment using the command below.
> virtualenv --system-site-packages ~/tensorflow
The next command activates the virtual environment. This will change your prompt to (tensorflow)$.
> source ~/tensorflow/bin/activate # bash, sh, ksh, or zsh
To deactivate the virtual environment use command deactivate.
Install Tensor Flow in active environment.
> (tensorflow)$ pip install --upgrade tensorflow
To test the install run the following code.
$ python >>> import tensorflow as tf >>> hello = tf.constant('Hello, TensorFlow!') >>> sess = tf.Session() >>> print(sess.run(hello))
All being well Tensor Flow should be successfully installed.
If you would like to learn more about TensorFlow a good online course covering the basics is available on coursera.org called Introduction to Tensorflow. This helped me with understanding best practices when using TensorFlow for building scalable applications.
If you would like more info, feel free to reach out.
This work was conducted as part of my research into music and its effect on mood study.