1

I got the following error message screen when trying to install Flask in Ubuntu 16.04.

https://i.sstatic.net/NVfp9.png

karel
  • 122,292
  • 133
  • 301
  • 332

1 Answers1

2

Flask packages for Python 2.x and Python 3.x can be quickly and easily installed from the default Ubuntu repositories in all currently supported versions of Ubuntu. Open the terminal and type:

sudo apt install python-flask # for Python 2.x

...and/or

sudo apt install python3-flask # for Python 3.x  

Judging from the error messages that you got, the attempted installation of Flask using pip failed for two reasons listed in order of probability.

  1. You got a Permission denied error because you ran pip install flask as a normal user instead of prefacing the same command with sudo like this: sudo pip install flask

  2. You may also need to update pip to the latest version first.

    sudo -H pip2 install --upgrade pip
    
karel
  • 122,292
  • 133
  • 301
  • 332