Use the following instructions to install the Python package manager (pip), create and activate the environment and install necessary pip packages.
pip is Python's package manager. After installing it, the necessary Python packages can be installed. The first of which will be the virtual environment manager (venv).
Install pip and venv
Package | Purpose |
---|---|
python3-pip | python 3 package manager |
python3-venv | virtual environment manager |
The commands below can be used to create the virtual Python environment and activate it. After doing so, the pip packages can be installed in the newly created environment.
Create environemt and activate
Package | Purpose |
---|---|
python3 -m venv | create virtual environment |
source bin/activate | activate the virtual environment |
Use the following command to install necessary pip packages that will be utilized by the Flask application. Only the virtual environment will have these packages installed and will not effect the host Python installation.
Install nessesary pip packages
Command | Function |
---|---|
pip3 install | install following Python packages |
Flask | Python framework |
Flask-Mail | mail validation |
Flask-SQLAlchemy | database handling |
Flask-WTF | form handling |
waitress | production server |
dnspython | dns resolve |
email-validator | validate form data |