To use virtualenv, you will need to have pip, the Python package installer, already installed on your machine (by default, it should also be installed when you install Python).
-
Windows
python3 -m venv env .\env\Scripts\activate
-
Linux/macOS
python3 -m venv env source env/bin/activate
If you are unable to get virtualenv to run, you might need to run the following command first:
sudo apt install python3-venv
You will need to install project dependencies for the provided code to work. This only needs to be done once.
pip install -r requirements.txt
Once you are finished working on the project, you can exit virtualenv by running the following command:
deactivate
Credits: Alina Cleshan Ethan