Pipfile not showing all installed packages

Question:

I am using pipenv as the virtual environment in a Django project. I installed the Django third-party package django-allauth-2fa via pipenv install django-allauth-2fa==0.8.

In the package’s docs regarding its installation it says: note that this will install Django, django-allauth, django-otp, qrcode and all of their requirements.

After successfull installation I wanted to check if this is in fact the case, however my Pipfile did not show any new installation besides django-allauth-2fa. I double checked with pip freeze from within the virtual environment shell and got a list back, in which all the package’s dependencies were indeed listed (qrcode, django-otp, etc.)

My question is hence: Do I have a misunderstanding about how the Pipfile works? I assumed that the file shows all the packages that are installed in my virtual environment. Or are only those shown that were installed via the pipenv install <package> command but not those that were installed alongside packages installed via pipenv install <package>?

Asked By: Daniel

||

Answers:

pip freeze shows all of the installed packaged. While pipenv shows only the explicitely declared (to be installed) packages. Maybe a better explanation: pipenv shows the packages you want to install, while pip freeze shows every package that need to be installed for your package to work.

Answered By: Janekx