To install pip
sudo apt-get install -y python3.8-pip
To install python3 virtual env
sudo apt install python3.8-venv
if required for python3.10
sudo apt install python3.10-venv
To create a virtual env run the below command
python3.8 -m venv venv
To activate virtual env run the below command
source venv/bin/activate
To deactivate just type deactivate
deactivate
Deleting the Python Virtual Environment
rm -rf venv
To check the installed Python package inside the virtual env run the below command
pip list or pip3 list