Flask Environment Building under windows

Source: Internet
Author: User

Building the Flask framework in Windows is divided into the following steps

1. Download the ez_setup.py file and execute it in cmd

Link: http://pan.baidu.com/s/1qXOSeHu Password: JKBW

Python ez_setup.py

2. Locate the Python installation directory, locate the Scripts folder, and add the path of the secondary folder to the environment variable.

3. Perform the install Pip in cmd

Easy_install pip

4. Installing virtualenv

Pip Install Virtualenv

5. Create a folder, the Flask Project Project (My_project)

6. Open the My_project directory in cmd

7. Execute Virtualenv venv, at which point a venv folder will be found in the My_project folder

Virtualenv venv

8. Finally execute in CMD

Pip Install flask

9. Open the My_project project with Eclipse or pycharm at this point.

10. Create a new Python file under the project, hello.py inside the contents as follows

From flask import Flaskapp = Flask (__name__) @app. Route ("/") def hello ():    return ' Hello World '    if __name__ = = "__main__":    app.run ()    

Flask Environment Building under windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.