How to Install TensorFlow on CentOS 7

Install TensorFlow on CentOS 7

In this article, we will have explained the necessary steps to install and configure TensorFlow on CentOS 7. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

TensorFlow™ is an open source Machine Learning framework released by Google. From its official site, TensorFlow™ is an open source software library for high performance numerical computation, which allows easy deployment of computation across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters of servers to mobile and edge device.

Install TensorFlow on CentOS

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install Python.

Let’s started for the installation Python:

Step 3. Create Virtual Environment.

Create a Python Virtual Environment called tensorflow_env using the Python module venv. And each Python Virtual Environment has its own Python binary:

To start using this virtual environment, you need to activate it by running the activate script:

Once your virtual environment is activated, you should see something similar to the below:

Step 4. Install TensorFlow.

Now that the virtual environment is activated, it’s time to install the TensorFlow library:

Step 5. Creating Simple TensorFlow Program.

Once the installation is completed, you can check if your TensorFlow is in running condition or not:

Save and close the file, then executing this python file with the following commad:

Outputs:

Congratulation, you have learned how to install and configure TensorFlow on CentOS 7. If you have any question, please leave a comment below.