VOOZH about

URL: https://www.digitalocean.com/community/tutorials/how-to-install-tensorflow-on-ubuntu-20-04

⇱ How To Install TensorFlow on Ubuntu 20.04 | DigitalOcean


How To Install TensorFlow on Ubuntu 20.04

Published on June 23, 2020
Not using Ubuntu 20.04?
Choose a different version or distribution.
Ubuntu 20.04
👁 How To Install TensorFlow on Ubuntu 20.04

Introduction

An open-source machine learning software library, TensorFlow is used to train neural networks. Expressed in the form of stateful dataflow graphs, each node in the graph represents the operations performed by neural networks on multi-dimensional arrays. These multi-dimensional arrays are commonly known as “tensors,” hence the name TensorFlow.

In this tutorial, you’ll install TensorFlow in a Python virtual environment with virtualenv. This approach isolates the TensorFlow installation and gets things up and running quickly. Once you complete the installation, you’ll validate your installation by importing Tensorflow to ensure you have no errors.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the author

Community and Developer Education expert. Former Senior Manager, Community at DigitalOcean. Focused on topics including Ubuntu 22.04, Ubuntu 20.04, Python, Django, and more.

Still looking for an answer?

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

preliminary step is to install latest nvidia drivers and cuda which happens at https://developer.nvidia.com/cuda-downloads

interestingly if you install from this download it will give you matching nvidia drivers, namely when you choose cuda 11.6 it install that and nvidia driver 510 which is super … thanks for this tutorial

if get an error after typing in “import tensorflow as tf”. Unable to figure it out

">>> import tensorflow as tf 2024-01-14 19:30:18.202052: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-01-14 19:30:18.202267: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-01-14 19:30:18.204603: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-01-14 19:30:18.214772: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2024-01-14 19:30:19.617811: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT "

👁 Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

© 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.