Project Setup
Virtual Environment#
Create Virtual Environment#
To create a virtual environment execute the following command:
python3 -m venv .venv
.venv
in the current working directory containing the virtual environment with the Python interpreter and pip
pre-installed. Activate Virtual Environment#
To use the newly created virtual environment execute one of the following commands based on the shell you are using:
- bash:
source .venv/bin/activate
- fish:
. .venv/bin/activate.fish
Recommended Packages To Install#
- Minimum:
- wheel
- setuptools
python3 -m pip install --upgrade pip wheel setuptools
- Optional:
- PyContracts: For Design by contract (DbC)
- pytest: For testing
python3 -m pip install PyContracts pytest
Requirements Files#
Create Requirements Files#
python3 -m pip freeze > requirements.txt
Install From Requirements File#
python3 -m pip install -r requirements.txt
References#
Last update: January 14, 2021
Authors: