0

Is there a way to get pip to only show the packages I manually installed, not every package installed because of dependencies?

example requirements.txt file based on only manually installed packages:

elasticsearch==7.14.0
matplotlib==3.4.3
numpy==1.21.2
pytz==2021.1

But pip freeze shows the following:

certifi==2021.5.30
cycler==0.10.0
elasticsearch==7.14.0
kiwisolver==1.3.1
matplotlib==3.4.3
numpy==1.21.2
Pillow==8.3.1
pyparsing==2.4.7
python-dateutil==2.8.2
pytz==2021.1
six==1.16.0
urllib3==1.26.6

I have tons of projects with the entire pip freeze saved as requirements.txt with modules that collide when upgrading.

MortenB
  • 2,749
  • 1
  • 31
  • 35
  • 2
    [`pipdeptree`](https://stackoverflow.com/a/54763010/7976758) Found in https://stackoverflow.com/search?q=%5Bpip%5D+list+top-level – phd Aug 19 '21 at 17:19
  • pipdeptree is the solution, should be a part of pip, thanks @phd – MortenB Aug 20 '21 at 06:55

0 Answers0