- install virtualenv
pip3 install virtualenv- use
pip3 install virtualenv --break-system-packageswhen using python3.11 or newer
- use
- create envrionment
python3 -m venv env - activate envrionment
source env/bin/activate- you should now see a "(env)" in your command line
- for later deactivating the environment run
deactivate
- install dependencies
pip3 install -r requirements.txt
- be sure that envrionment is activated (
source env/bin/activate) - install dependency
pip3 install ... - save dependency to requirements.txt by running
pip3 freeze > requirements.txt - and commit it