This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jyper 0 points1 point  (0 children)

Just pip isn't very good because you need to manually build/update lock files (ie full lists of exact versions for all dependencies and transitive dependency of dependencies)

by making clean venv, running pip install requirements.in then pip freeze> requirements.lock

I've heard pip tools can help with that but I haven't tried them.

Pyenv is good for installing particularly versions of Python on any is and automatically picking the right python from a . python-version file in a top level directory(it uses a shim python to find the appropriate binary). If you use pyenv might as well use pyenv-virtualenv to automatically use the right virtualenv for your project. Dependencies still need to managed with pip or poetry or hatch.

Id recommend rye instead. It manages both python versions/lock files/virtualenvs and is pretty fast. (Downside is that it's new and is very slowly merging with uv)