Should we put all required and their dependent packages on requirement.txt or only required packages
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Take control of your privacy with Proton's trusted, Swiss-based, secure services.
Choose what you need and safeguard your digital life:
Mail: https://go.getproton.me/SH1CU
VPN: https://go.getproton.me/SH1DI
Password Manager: https://go.getproton.me/SH1DJ
Drive: https://go.getproton.me/SH1CT
Music by Eric Matyas
https://www.soundimage.org
Track title: Cool Puzzler LoFi
--
Chapters
00:00 Should We Put All Required And Their Dependent Packages On Requirement.Txt Or Only Required Packages
01:13 Accepted Answer Score 5
02:03 Thank you
--
Full question
https://stackoverflow.com/questions/4852...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #python3x #python27 #pip
#avk47
ACCEPTED ANSWER
Score 5
I digged myself a lot, and what @Charles Duffy commented above seems most proper way.
You should have two separate dependency lists: One with the dependencies a human has decided you need (which shouldn't contain transitive dependencies); one with the frozen list that reflects what you tested against (which should contain transitive dependencies)
However, Recently with the release of pipenv, I think this is the better way to keep track of dependencies.
It's like npm, much easier to maintain requirements and creating venv.
It automatically creates and manages a virtualenv for your projects, as well as adds/removes packages from your Pipfile as you install/uninstall packages. It also generates the ever–important Pipfile.lock, which is used to produce deterministic builds.