How to install Flask in visual studio code?

preview_player
Показать описание
How to install Flask in visual studio code?

In this tutorial, we will learn how to install flask and set up a development environment for Flask in Visual Studio Code.

1) Flask is a lightweight python framework for web applications with basic support for URL routing and page rendering.
2) Also known as 'micro framework' because it does not directly provide the following features like validation, database abstraction, authentication, and so on. We can use these features with help of a special python package which is called Flask Extension.
3) Flask does not provide a template engine, but installing Flask includes the 'Jinja templating engine by default.

Prerequisites
=============
1) Install the Python extension (by Microsoft) in Visual Studio Code.
2) Install a version of Python 3
3) On Windows, make sure the location of your Python interpreter is included in your PATH environment variable.

Create a project environment for the Flask
===========================================
Important Note :
================ we need to create a virtual environment in which we will install Flask, Using a virtual environment avoids installing Flask into a global Python environment and gives you exact control over the libraries used in an application.

Step 1: Open Command Prompt

Step 2: Execute "python --version" : to check if python is installed or not.

Step 3: Now run following command to activate virtual environment : "pip install setuptools virtualenv"

Step 4: Run: "pip install flask flask-sqlalchemy"

Step 5: Restart VS Code.

Now we have an environment ready for writing Flask code.

#FlaskSetupVSCode #techsatsang #flaskTutorialBeginners
Рекомендации по теме
Комментарии
Автор

even after manipulation it answers : "ModuleNotFoundError: No module named 'Flask'"
why??

erwan
Автор

Thank U Thank U Thank U Thank U Thank U 3000

umaralam
Автор

brother having 19 subscriber solve this issue wow

POV_hamza
Автор

ERROR: Could not find a version that satisfies the requirement flack-sqlalchemy (from versions: none)

dclspvq
Автор

i made virtual voroment and still had this issue, so i tried this method and the errors did go away but within one minute they started appearing again... not sure what else i can do.. i guessi can only run it through the terminal

williamvillantay
Автор

'pip' is not recognized as an internal or external command,
operable program or batch file.

alvinang