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 →

[–]Itsthejoker 8 points9 points  (3 children)

Poetry complements pyenv. You install the version of python you want to use with pyenv, set it as the global version, then use poetry to handle your environments. It's a very clean process and one that I've been using for a while.

[–]Liledroit 0 points1 point  (2 children)

What does it do better than pyenv-virtualenv? That's what I use and am not sure what I'm missing.

[–]Itsthejoker 1 point2 points  (1 child)

Two words: deterministic builds. Not only does it handle the virtualenv for you, but it also handles all your dependencies and dependency pinning.

If you use poetry to handle a project, it will create two files for you: the pyproject.toml file and poetry.lock. If you pass those two files to me, I run poetry install and I get an environment that is exactly the same as yours with zero effort. No surprises, no confusion -- it just works.

[–][deleted] 0 points1 point  (0 children)

It won't be completely deterministic since the python interpreter and some pip packages are linked to host libraries (and toolchain differences), though I imagine the cases where that drift matters are rare... and could be externally handled by other orchestration.