TensorFlow is a free and open-source software library for dataflow and differentiable programming across a range of tasks. It is a symbolic math library and is also used for machine learning applications such as neural networks.
In this guide, we will explain how to install TensorFlow on a Debian 9 server.
Deploying your cloud server
If you have not already registered with Cloudwafer, you should begin by getting signed up. Take a moment to create an account after which you can quickly deploy your cloud servers.
Updating System Packages
It is recommended that you update the system to the latest packages before beginning any major installations. Issue the command below:
sudo apt-get update && sudo apt-get upgrade
Step 1: Install Python 3 and venv
To install Python 3 and venv on your Debian 9 Server, follow the steps in this guide
Step 2: Creating a Virtual Environment Change your working directory to the directory where we are going to our Python 3 virtual environments. It can be our home directory or any other directory where the user has read and write permissions.
mkdir my_cloudwafer_tensorflow cd my_cloudwafer_tensorflow
Next, issue the following command to create the virtual environment:
python3 -m venv venv
Next, issue the command below to run the activate script:
Lastly for this step, issue the following command to upgrade pip to the latest version as the TensorFlow installation requires pip version 19 or higher.
pip install --upgrade pip
Step 3: Install TensorFlow
Next step is to install the TensorFlow package using the command below:
pip install --upgrade tensorflow
After installation, we can carry out a verification which will print the TensorFlow version:
python -c 'import tensorflow as tf; print(tf.__version__)'
Visit the Get Started with TensorFlow page to learn how to build your first ML application.
Next, issue the command
deactivate to deactivate the environment and return to your normal shell.