Install flask under Windows

Source: Internet
Author: User
Tags virtualenv

1. Install the Python environment:

This is not to be discussed here.

2, install VIRTUALENV virtual environment:

This is used to create a virtual environment using the third-party tool Virtualenv . The benefits of the virtual environment are as follows (excerpt network):

  "  install  flask  The most convenient way is to use a virtual environment. The virtual environment is a private copy of the  python  interpreter, in In this environment you can install private packages , and does not affect the global  python  interpreter installed in the system. "

  "< Span class= "Fontstyle2" > Virtual environment is very useful, can be in the system  python  The interpreter avoids the confusion of the package and the version conflict. Creating a separate virtual environment for each neat, Make it a source for creating (more) virtual environments. The advantage of using a virtual environment is that you do not need Administrator privileges. "

Enter command in CMD: virtualenv--version to detect if the Windows system has Virtualenv installed, error description not installed, Install virtualenv with the command pip install.

Install and then enter the command: Virtualenv--version, such as:

Create a project directory that you can either receive or create with the following command:

A venv folder is generated under the Pythonproject folder on the G-disk.

To activate a virtual environment:

Enter Command venv\scripts\activate

3. Install flask in virtual environment:

Use the command pip install flask

Start the Python interpreter, import Flask, and verify that it is installed:

If there is no error, the installation is successful.

4. Open the project with Pycharm:

Select "File", "Open", such as:

can be easily developed.

As a beginner, I create projects like this, and how to create them in real work is unclear.

Install flask 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.