Better requitements.txt install pipdeptree pip install pipdeptree pipdeptree -f 2>/dev/null | grep -v '^ ' | tee requirements.txt