FedoraRHEL Based

How To Install TensorFlow on Fedora 39

Install TensorFlow on Fedora 39

In this tutorial, we will show you how to install TensorFlow on Fedora 39. TensorFlow is an open-source machine learning library developed by Google that has become a popular choice for data scientists and machine learning enthusiasts. It provides a flexible and efficient platform for building and deploying machine learning models, including deep learning, natural language processing, and computer vision applications.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the TensorFlow on a Fedora 39.


Before diving into the installation process, let’s ensure that you have everything you need:

  • A server running one of the following operating systems: Fedora 39.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • You will need access to the terminal to execute commands. Fedora 39 provides the Terminal application for this purpose. It can be found in your Applications menu.
  • A network connection or internet access to download the TensorFlow packages.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install TensorFlow on Fedora 39

Step 1. Before installing TensorFlow, it’s crucial to update your Fedora 39 system to the latest version. This ensures that you have the most recent security patches and software updates. To update your system, open the terminal and run the following command:

sudo dnf clean all
sudo dnf update

Step 2. Installing Python and Pip.

TensorFlow requires Python and Pip to function correctly. Python is a versatile programming language used in various applications, including machine learning and data science. Pip is the package manager for Python, allowing you to install and manage Python packages easily. To install Python and Pip on Fedora 39, run the following command:

sudo dnf install python3 python3-pip

This command will install Python 3 and Pip on your system. Verify the installation by running the following commands:

python3 --version
pip3 --version

Step 3. Installing TensorFlow on Fedora 39.

Now that you have Python and Pip installed, you can proceed with installing TensorFlow. There are two primary TensorFlow installations: one for CPU users and another for GPU users. The GPU version of TensorFlow leverages the power of your graphics card to accelerate computations, making it ideal for deep learning tasks. To install the CPU version of TensorFlow, run the following command:

pip3 install --user tensorflow

For GPU users, install the GPU version of TensorFlow by running:

pip3 install --user tensorflow-gpu

After installing TensorFlow, it’s essential to verify that the installation was successful. To do this, open the terminal and run the following commands:

python3 -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

This command will import TensorFlow, generate a 1000×1000 matrix of random numbers, and compute the sum of the matrix elements. If the installation is successful, you should see an output similar to the following:

tf.Tensor(-1100.123, shape=(), dtype=float32)

The exact value may differ, but the presence of a tf.Tensor output indicates a successful installation.

Step 4. Troubleshooting Common Issues.

During the installation process, you may encounter some common issues. Here are a few solutions to help you resolve them:

  1. Permission issues: If you encounter permission errors during the installation, try running the commands with sudo or using the --user flag with pip3 to install packages in your user directory.
  2. Incompatible Python version: TensorFlow requires Python 3.6-3.9. If your system has an incompatible version, consider using a virtual environment or updating your Python installation.
  3. GPU compatibility: If you’re installing the GPU version of TensorFlow, ensure that your graphics card is compatible with CUDA and cuDNN.
  4. Outdated Pip: If you encounter issues related to package installation, try updating Pip by running pip3 install --upgrade pip.

Congratulations! You have successfully installed TensorFlow. Thanks for using this tutorial for installing TensorFlow on your Fedora 39 system. For additional or useful information, we recommend you check the official TensorFlow website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button