Home Tutorials How To Install TensorFlow Machine Learning System on Ubuntu Linux

How To Install TensorFlow Machine Learning System on Ubuntu Linux

In advanced mathematics, the word Tensor is a multi-dimensional array, and flow is the operations graph. The TensorFlow machine learning system is an open-source library function tool for machine learning. It is used to create models using data, create graphs with nodes, edges, and multi-dimensional arrays. You can install the TensorFlow machine learning system on Ubuntu without any special hardware. Integrated functions are also available to use Tensorflow with the Anaconda Navigator or Jupyter notebook on a Linux system.

TensorFlow Machine Learning System on Ubuntu


Tensorflow machine learning system is compatible with different operating systems and environments. In Linux, you can use Tensorflow with a Python front-end environment. It has API for both C++ and Python and supports distributed processing. It allows you to distribute works among several computers through Tensorflow. This post will see how to use the Pip environment to set up the Tensorflow library tool on a Linux system.

Step 1: Install Python3 Virtual Environment


As the TensorFlow machine learning system requires python, we will install the python3 virtual environments on our Ubuntu system. It is available on the official Linux repository. You can run the following aptitude command to install the Python3 environment on your system.

sudo apt-get install python3 python3-venv python3-dev -y

apt-get install python3

When the installation finishes, check if python3 is installed or not.

python3 -V

Step 2: Create A TensorFlow Directory


After installing the Python environment, we will create a new directory to store the TensorFlow data on the Ubuntu filesystem. You can run the following make directory and cd commands mentioned below to create a new directory and create a virtual environment.

Here, I’ve created a new directory named tensorflow_files to use as a repository for the Tensorflow machine learning system.

mkdir tensorflow_files
cd tensorflow_files
python3 -m venv virtualenv
python3 -m venv venv

Now, run the following command on your terminal shell with root privilege to active it on your Ubuntu system.

source venv/bin/activate

Step 3: Upgrade Pip Version


The new directory might take a few seconds to get activated with the new virtual environment. Run the following pip command on the terminal shell to upgrade the Pip package. The upgraded Pip python installer will help you get the latest version of the TensorFlow machine learning system on your Ubuntu system.

# pip install --upgrade pip

Step 4: Install TensorFlow Machine Learning System


Finally, run the pip install command on your terminal shell to install the TensorFlow machine learning library on your Ubuntu. Make sure you have the root access before running the command.

pip install --upgrade tensorflow

The installation process may take a while to finishes up. Run the following command to verify the TensorFlow machine learning library tool on your system. In the return command, you would see the version of the TensorFlow tool on your machine.

# python -c 'import tensorflow as tf; print(tf.__version__)'

When the installation and checking finishes, you can use the following command to deactivate Python’s virtual environment on your Ubuntu Linux system.

(venv) root@ubuntupit:~/tensorflow_files# deactivate

Final Words


Tensorflow is one of the highest-rated repositories on Github. It can be used in research and production environments. You can create and implement algorithms, simple math applications, liner, and logistic regression with the Tensorflow machine learning tool. Even if you’re a non-computer science person, you can run the Tensorflow library for analyzing and creating architectural designs.

I’ve described how to install the TensorFlow machine learning system on Ubuntu Linux in the entire post. Please share it with your friends and the Linux community if you find this post useful and informative.

NO COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Exit mobile version