title: gunicorn ImportError: No module named flask
body: <p>I have an anaconda virtual environment and I have already install flask in the virtual environment using pip
  when I run my app using </p>
  
  <pre><code>$ python app.py 
  </code></pre>
  
  <p>then it's working correctly, But when I run it with gunicorn I't showing that no module flask<br/>
  app.py</p>
  
  <pre class="lang-py prettyprint-override"><code>from flask import Flask
  
  app = Flask(__name__)
  
  @app.route('/')
  def index():
      return "Hello World"
  
  if __name__ == '__main__':
      app.run(debug=True)
  </code></pre>
  
  <p>wsgi.py</p>
  
  <pre class="lang-py prettyprint-override"><code>from app import app
  if __name__ == "__main__":
      app.run()
  </code></pre>
  
  <pre><code> $ gunicorn --bind 0.0.0.0:8000 wsgi
  [2019-07-23 12:39:24 +0000] [25612] [INFO] Starting gunicorn 19.9.0
  [2019-07-23 12:39:24 +0000] [25612] [INFO] Listening at: http://0.0.0.0:8000 (25612)
  [2019-07-23 12:39:24 +0000] [25612] [INFO] Using worker: sync
  [2019-07-23 12:39:24 +0000] [25616] [INFO] Booting worker with pid: 25616
  [2019-07-23 12:39:24 +0000] [25616] [ERROR] Exception in worker process
  Traceback (most recent call last):
    File "/home/rahul/.local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
      worker.init_process()
    File "/home/rahul/.local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
      self.load_wsgi()
    File "/home/rahul/.local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
      self.wsgi = self.app.wsgi()
    File "/home/rahul/.local/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
      self.callable = self.load()
    File "/home/rahul/.local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
      return self.load_wsgiapp()
    File "/home/rahul/.local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
      return util.import_app(self.app_uri)
    File "/home/rahul/.local/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app
      __import__(module)
    File "/home/rahul/test_folder/wsgi.py", line 1, in &lt;module&gt;
      from app import app
    File "/home/rahul/test_folder/app.py", line 1, in &lt;module&gt;
      from flask import Flask
  ImportError: No module named flask
  [2019-07-23 12:39:24 +0000] [25616] [INFO] Worker exiting (pid: 25616)
  [2019-07-23 12:39:24 +0000] [25612] [INFO] Shutting down: Master
  [2019-07-23 12:39:24 +0000] [25612] [INFO] Reason: Worker failed to boot.
  </code></pre>