How To Install Flask-Sqlalchemy Via Pip?
You can use pip, which is a Python package manager, to install the Flask-Sqlalchemy library. Follow the below steps to install the Flask-Sqlalchemy library in Python using Pip.
Installing Flask-Sqlalchemy on Windows
Below is the step-by-step procedure by which we can install Flask-Sqlalchemy on Windows in Python:
Step 1: Open Command Prompt
Open Command Prompt on your Windows operating system.
Step 2: Install Flask-SQLAlchemy
Type the below command in the cmd you have opened:
pip install Flask-SQLAlchemy
If the above command throws an error, then type the below command:
python -m pip install Flask-SQLAlchemy
It will take a few seconds to install. Wait for some time for the installation to finish. Now, you have successfully installed Flask-SQLAlchemy on your Windows system.
Step 3: Verify Installation
You can verify whether the installation was successful by opening your terminal and using the pip show command. If your installation was successful, it will show the package name and details, as shown in the image below.
Installing Flask-Sqlalchemy on MacOS
Below are the step by step procedure by which we can install Flask-Sqlalchemy on MacOS in Python:
Step 1: Open Terminal
Open the Linux Terminal on your Linux machine.
Step 2: Install Flask-SQLAlchemy
Type the below command in the terminal you have opened:
pip3 install Flask-SQLAlchemy
If the above command doesn’t work, then run the below command:
python -m pip install Flask-SQLAlchemy
It will take a few seconds to install. Wait for some time for the installation to finish. Now, you have successfully installed Flask-SQLAlchemy on your Linux system.
Step 3: Verify Installation
You can verify whether the installation was successful, by opening your terminal and using the pip3 show command. If your installation was successful, it will show the package name and details as shown in the image below.
pip3 show Flask-SQLAlchemy
Install Flask-Sqlalchemy with Pip
Flask is a Python-based web app framework that helps you develop lightweight and deployable web apps. The Flask framework supports several features like URLs, Templating Engines, and Routing. To provide support for database connection and query, one can use the Flask-Sqlalchemy library in Python, which is one of the popular Python libraries. Flask-SQLAlchemy includes support for using SQLAlchemy in your Flask application on top of your Flask Framework.
In this article, we will look at how to install the Flask-Sqlalchemy package using the pip package manager for Python.