Show installed packages, hidding auto-installed dependencies

Viewed 41

I want to display what package I manually installed, hiding all dependencies. Instead of having ~50 packages shown in my list.

I have installed spyder and pandas, so I would like a command like this...

conda install --do_something

... to return a result like this

  • python
  • pip
  • spyder
  • pandas

... instead of this mess

enter image description here

Just to make it clear, if I were to open someone else's install (most likely my own in 2 months from now) I would like to know exactly what the human wanted to install, to get the intent.

I already looked into the documentation but didn't find what I was looking for.

Thank you in advance for your answers.

1 Answers

You can use pipdeptree to do create a requirements.txt file and have all of your "human installed" packages show up.

Link: https://pypi.org/project/pipdeptree/

Make sure to pip install pipdeptree and then you can use pipdeptree -f | tee locked-requirements.txt in your command line to make the requirements.txt file. Make sure to check out the docs linked above because they can provide some other useful tools that you can use :)

Related