5 ms·
> and it will update your dependencies. I'm pretty sure you need an extra step, since pip freeze will put "==" constraints in the lock file. I do the same thin
by 323 4y ago
> and it will update your dependencies.
I'm pretty sure you need an extra step, since pip freeze will put "==" constraints in the lock file. I do the same thing, but I have this extra step to replace "==" with ">="
sed -i "s/==/>=/g" requirements.txt.lock
- ansgri 4y agoIsn't the purpose of the lock file to lock precise versions for max reproducibility?
- nurettin 4y agoThere is a misunderstanding. This is why I don't use the lock file to update dependencies in the first place. You have to use the requirements.txt for updates. The lock is for deploying, or initializing to last stable revision. requirements.txt also ensures that you only install what you need.
- 323 4y agoBut pip -U will only update first level dependencies (the ones directly listed in requirements.txt). It will not update secondary dependencies. This is why every 3 months or so I completely delete the venv and recreate it.
- nurettin 4y agoI see, yes unfortunately even if we lock the requirements, people just yank versions or update them in place. It all feels a little bit finicky pardon the fun.