3 ms·
If I'm reading you correctly, the missing feature in pip is to list dependencies for one package so they can be put into requirements.txt. This is a missing fe
by INTPenis 10y ago
If I'm reading you correctly, the missing feature in pip is to list dependencies for one package so they can be put into requirements.txt.
This is a missing feature, there are various hacks but nothing concrete.
If you're working on a large project you have to keep track of all your dependencies and preferably only add the main dependency, not its dependencies, into requirements.
I tend to avoid doing pip freeze > requirements.txt because it lists packages I know shouldn't be in requirements.
- morgante 10y agoI think you misunderstood. Like civilian, my main ask for an improved pip would be a way to save a single explicit package into my requirements.txt by adding a --save flag when installing it. I don't want to include sub-dependencies in my requirements.txt.
- INTPenis 10y agoI believe I follow. The way to maintain requirements.txt with single dependencies (base dependencies maybe, I'm self-taught on the lingo), is to manually add them one by one. Pip freeze is useless because it adds a lot of things you don't need into requirements, making it cluttered and hard to follow.
- morgante 10y agoYes, I (and civilian) know that. The point is that it's comparatively cumbersome. You have to manually add the specific version into requirements.txt instead of being able to automatically save it as you install.