About pip-sync

Use the pip-sync command from the pip-tools package instead of pip install -r to make sure that the virtual environment doesn't have any unused packages and is in sync with your requirements.txt file:

1
(venv)$ pip-sync requirements.txt

Tips and Tricks Programming Development Python 3 pip pip-tools