Is there any way to show the dependency trees for pip packages?

You should take a look at pipdeptree: $ pip install pipdeptree $ pipdeptree -fl Warning!!! Cyclic dependencies found: ———————————————————————— xlwt==0.7.5 ruamel.ext.rtf==0.1.1 xlrd==0.9.3 openpyxl==2.0.4 – jdcal==1.0 pymongo==2.7.1 reportlab==3.1.8 – Pillow==2.5.1 – pip – setuptools It doesn’t generate a requirements.txt file as you indicated directly. However the source (255 lines of python code) should be relatively easy … Read more

requirements.txt vs setup.py

requirements.txt: This helps you to set up your development environment. Programs like pip can be used to install all packages listed in the file in one fell swoop. After that you can start developing your python script. Especially useful if you plan to have others contribute to the development or use virtual environments. This is … Read more

How to customize a requirements.txt for multiple environments?

You can cascade your requirements files and use the “-r” flag to tell pip to include the contents of one file inside another. You can break out your requirements into a modular folder hierarchy like this: `– django_project_root |– requirements | |– common.txt | |– dev.txt | `– prod.txt `– requirements.txt The files’ contents would … Read more

Reference requirements.txt for the install_requires kwarg in setuptools setup.py file

On the face of it, it does seem that requirements.txt and setup.py are silly duplicates, but it’s important to understand that while the form is similar, the intended function is very different. The goal of a package author, when specifying dependencies, is to say “wherever you install this package, these are the other packages you … Read more