The pip freeze command will add installed packages, with the version number installed on the virtual environment and saves it in the requirements.txt file. Heroku and Google cloud functions require the packages installed for your project.