Why does pip install requirements.txt install extra packages?

前端 未结 2 1974
攒了一身酷
攒了一身酷 2021-01-27 14:29

I have a repository with an inflated requirements.tx that I\'d like to clean up. Using pipreqs I\'ve set my requirements.txt to be a minimal set of packages need for my reposito

相关标签:
2条回答
  • 2021-01-27 14:46

    Yes. The packages are dependencies of your dependencies​.

    But no, you should not specify them directly. Automatic tools know to download dependencies recursively and it would significantly add to maintenance overhead.

    0 讨论(0)
  • 2021-01-27 15:00

    This might have been because of the dependencies of your written libs in requirements.txt. For ex: if you have written scipy as requirement numpy will also be installed because scipy is dependent on numpy.

    0 讨论(0)
提交回复
热议问题