4 ms·
Virtual environments are easy to create and manage. Create one with the built-in venv module: python3.10 -m venv ./venv # or your favorite version . .
by cpburns2009 4y ago
Virtual environments are easy to create and manage. Create one with the built-in venv module:
python3.10 -m venv ./venv # or your favorite version
. ./venv/bin/activate
pip install pip-tools
Manage dependencies using pip-compile from pip-tools. Store direct dependencies in "requirements.in", and "freeze" all dependencies in "requirements.txt" for deployment:
. ./venv/bin/activate
pip-compile -U -o ./requirements.txt ./requirements.in
pip install -r ./requirements.txt