Core Developer @ Hudson River Trading
On 4/18/2021, 6:52:54 PM
Notes for my own reference. I don't like pip (I prefer npm with its implicit local environments and don't find any of the following command names particularly intuitive) but had to use it for a group project today.
# creating virtual environment in venv/
python -m venv venv
# activating venv
. venv/bin/activate
# deactivating venv
deactivate
# destroying venv
rm -rf venv
Make sure you're in the venv when doing these.
# freezing dependencies
pip freeze >requirements.txt
# installing dependencies
pip install -r requirements.txt
© Copyright 2023 Jonathan Lam