Is there a way to get directory package dependencies in python?

Question:

I am aware that pip freeze > requirements.txt exists, yet that that prints out my system packages, of which only a few my directory/ project needs.

I am not using a virtualenv so I’m pretty sure I can’t print out local packages like that.

I also know that pipdeptree exsists but I also don’t see how that solves my problem?

Asked By: Carlos Medina

||

Answers:

I believe tools like the following could help:

As far as I can tell, these tools read the code in the directory and try to figure out the dependencies required based on the import statements they found in the code.

Related:

Answered By: sinoroc
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.