This is the only solution that worked for me on Ubuntu-18.
Inside the file app.py
, use:
if __name__ == '__main__':
app.run(host='0.0.0.0', port=80)
The code above will give the same permission error unless sudo
is used to run it:
sudo python3 app.py