execute hello world with flask "ImportError: No module named flask"
Question: I'm trying to use flask and python. I did a simple file named `hello.py`. tHis
file contains this code:

    
    
    from flask import Flask
    app = Flask(__name__)
    
    
    @app.route("/")
    def main():
        return "Welcome!"
    
    if __name__ == "__main__":
        app.run()
    

This is a simple hello world with flask. I want to execute it but actually, I
have a problem. In the terminal, I typed `python hello.py` and I get this
error:

    
    
    File "hello.py", line 1, in <module>
    from flask import Flask
    ImportError: No module named flask
    

Even that I installed flask globally. I understand that this is a basic
question, but I'm stuck?


Answer: You don't have installed `flask`

## Linux:

Install `flask` as global package:

    
    
    sudo pip install flask
    

Install in virtualenv

    
    
    virtualenv venv
    source venv
    pip install flask
    

Install system package

  * debian, ubuntu
    
        apt-get install python-flask
    

  * arch
    
        pacman -S python-flask
    

  * fedora
    
        yum install python-flask
    

Install via [Anaconda](https://store.continuum.io/cshop/anaconda/)

    
    
    conda install flask
    

## Windows:

    
    
    python -m pip install flask
    

