title: Flask: OSError: [Errno 98] Address already in use - but why?
body: <p>I have a very simple code here:</p>
  
  <pre><code>from flask import Flask
  
  app = Flask(__name__)
  
  if __name__ == '__main__':
      app.run(debug=True)
  </code></pre>
  
  <p>I have run it the first time and it worked, then ctrl+c didn't work so I just killed python terminal myself. Then I tried to run it again and I get an error:</p>
  
  <pre><code> * Serving Flask app "untitled1" (lazy loading)
   * Environment: production
   WARNING: Do not use the development server in a production 
   environment.
   Use a production WSGI server instead.
   * Debug mode: on
   Traceback (most recent call last):
   File "&lt;stdin&gt;", line 1, in &lt;module&gt;
   File "/usr/lib/python3/dist- 
   packages/spyderlib/widgets/externalshell/sitecustomize.py", line 699, 
   in runfile
   execfile(filename, namespace)
   File "/usr/lib/python3/dist- 
   packages/spyderlib/widgets/externalshell/sitecustomize.py", line 88, 
  in execfile
  exec(compile(open(filename, 'rb').read(), filename, 'exec'), 
  namespace)
  File "/home/teoman/Desktop/flaskapp/untitled1.py", line 13, in 
  &lt;module&gt;
  app.run(debug=True)
  File "/home/teoman/.local/lib/python3.5/site-packages/flask/app.py", 
  line 943, in run
  run_simple(host, port, self, **options)
  File "/home/teoman/.local/lib/python3.5/site- 
  packages/werkzeug/serving.py", line 795, in run_simple
  s.bind(get_sockaddr(hostname, port, address_family))
  OSError: [Errno 98] Address already in use
  </code></pre>
  
  <p>I have found similar questions asked but I couldn't understand it because of the solutions were also complicated, I'm very new to Flask app (like ten minutes), I use Linux Mint MATE.</p>
  
  <p>NOTE: localhost:5000 works fine still I do not have any python command-lines open working Flask app.</p>