Could not import 'webapp' [duplicate]

Solution 1:

Your FLASK_APP variable is probably not correctly configured. Could you make sure that:

  1. Your file (the one with this code) is named webapp.py OR
  2. alternatively, that your FLASK_APP variable (however you set it) is set to the filename of the file containing this code.