5 ms·
It's a hassle to do this correctly and upgrade the dependencies. Use poetry.
by fnord123 4y ago
It's a hassle to do this correctly and upgrade the dependencies. Use poetry.
- robertlagrant 4y agopip freeze > requirements.txt
- fnord123 4y agoThat only generates a lock file. When you want to upgrade some of your dependencies and recalculate the correct versions, it doesn't help.
- robertlagrant 4y agoHow's that an issue? Here's an example of what happens: https://gist.github.com/robertlagrant/23489d8970ef6b4996030785f1e3ee58 https://gist.github.com/robertlagrant/23489d8970ef6b49960307...
- tomrod 4y agoSomeone else already responded. It's a one-line command. I never could get poetry to work right; it's configs are sort of messy. pip freeze > requirements is built in. The only thing it doesn't pin is the python version itself.
- fnord123 4y agoAs explained elsewhere in this thread, the one line command only generates a lock file. This doesn't manage the dependencies so if you want to upgrade cool-lib and recalculate all the transient dependencies so they fit with the rest of your libraries, you cannot afaik. Bad non-solutions being built in are a bad thing.