For CentOS and Red Hat Linux, you must install Python 3.

If you are using Ubuntu you do not have to perform this procedure. Ubuntu comes preinstalled with Python 3.

Procedure

  1. Update all currently installed packages by running the yum update command.
    sudo yum update
  2. To install Python 3, run the dnf command.
    sudo dnf install python3
  3. Verify that you are using Python 3 with the python3 -V command.
    python3 -V
    Python 3.6.8
  4. (Optional) Take a snapshot of your environment.

What to do next

Install TensorFlow. See Install TensorFlow.