Get the App
SLTechnology News&Howtos  ›  Development  › 

Environment configuration steps for Flask

Shulou Source: shulou.com Published: 2022-06-03 11:50:19 11月15日 Update

This article mainly explains "the steps of Flask environment configuration". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the steps of Flask environment configuration.

Flask is a popular Python language web framework, compared with Django,Flask is a lightweight framework, its WSGI toolbox uses Werkzeug, and the template engine uses Jinja2. Flask uses BSD authorization. Here, I will briefly introduce the steps of building Flask.

Install virtualenv for the development environment

Virtualenv is a virtual Python environment builder. It can help users create multiple Python environments in parallel. Compatibility issues between different versions of libraries can be avoided.

Install the virtualenv command:

Pip install virtualenv

This command requires administrator privileges. You can add sudo before pip on Linux / Mac OS. If you are using Windows, log in as an administrator.

Sudo apt-get install virtualenv

After installation, create a new virtual environment in the folder

Mkdir newprojcd newprojvirtualenv venv

Activate the appropriate environment on Windows, using the following command:

Venv\ scripts\ activate

Install Flask in this environment:

Pip install Flask

Of course, you can also type "pip install Flask" into the cmd of the windwos system to install it instead of being suitable for the virtual environment.

At this point, I believe you have a deeper understanding of the "Flask environment configuration steps", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Environment steps configuration commands content framework administrator learning management different practical deeper between interest compatibility multiple practical practical tools toolbox Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Apple OPPO Reno Shulou Tech Info Shulou Technology