title: terminal error: flask run zsh: command not found: flask
body: <p>I'm using a Mac , the python version is 2.7.10. and I installed flask</p>
  
  <pre><code>➜  Flask_blog python Python 2.7.10 (default, Oct  6 2017, 22:29:07) 
  [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import flask
  &gt;&gt;&gt;
  </code></pre>
  
  <p>I try to follow the tutorial of flash on <a href="http://flask.pocoo.org/docs/1.0/" rel="nofollow noreferrer">http://flask.pocoo.org/docs/1.0/</a></p>
  
  <p>the commands:</p>
  
  <pre><code>➜  Flask_blog export FLASK_APP=flaskblog.py
  ➜  Flask_blog flask run                    
  zsh: command not found: flask
  ➜  Flask_blog 
  </code></pre>
  
  <p>code in flaskblog.py:</p>
  
  <pre><code>from flask import Flask
  app = Flask(__name__)
  
  @app.route("/")
  def hello():
      return "Hello World!"
  </code></pre>
  
  <p>The error is <code>command not found: flask</code></p>
  
  <p>I also tried an other tutorial.</p>
  
  <p>commands:</p>
  
  <pre><code>➜  Flask_blog cd /Users/jzd/Movies/flask/Second_video 
  ➜  Second_video python one.py                           
  Sorry
  </code></pre>
  
  <p>code in one.py      </p>
  
  <pre><code>from flask import Flask
  
  app = Flask(__name__)
  
  @app.route('/')
  def index():
      return 'Hello World'
  
  if __name__ == '__name__':
      app.run('0.0.0.0')
  else:
      print("Sorry")
  </code></pre>
  
  <p>the condition <code>__name__ == '__name__':</code> did not pass.</p>
  
  <p>I guess the python <code>venv</code> matters.</p>
  
  <p>Really want to know how to fix it.</p>