'failed to install tensorflow on a EC2 instance Ubuntu 20.04

I have a flask application that I would like to run it on an EC2 instance and TensorFlow is needed cause it is image classification. However, after the necessary updates and upgrades, I try to install TensorFlow but after the progress bar completes, I don't see the successfully installed tensorflow==2.7.0. Images are attached, is there any reason for why it is not letting me install TensorFlow, or does the instance have limitations that won't let me install it. Please help and thanks in advance.

installing the TensorFlow on the EC2 instance



Solution 1:[1]

  • Increase the storage on the hard disk (30 GB on my case_
  • pip install tensorflow-cpu

link

Solution 2:[2]

I also faced the same error and apparently the storage was not the reason. I tried using large instance with large memory and I was able to install tensorflow in the anaconda environment successfully.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sjsu
Solution 2 Ro_3721