News for hackers. Stuff that matters.
Re:Pyenv – lets you easily switch between multiple versions ... by spacephysics on Monday March 25, 2024 @09:23AM (#39815973)
You didn’t miss Poetry, but I have to say up until I started using Poetry python in large projects was a pain in the tooling department to setup and maintain over longer periods of time.

It’s no panacea, but feels more stable and usable (especially from onboarding new team members PoV) than other tooling I’ve tried

Re:Pyenv – lets you easily switch between multiple versions ... by john-radio on Monday March 25, 2024 @09:45AM (#39816230)
What does poetry deliver beyond what pyenv gets you? I haven't used either tool super extensively.
Re:Pyenv – lets you easily switch between multiple versions ... by claytonjy on Monday March 25, 2024 @09:56AM (#39816354)
pyenv only manages python versions, while poetry manages dependencies and virtual environments. They are complimentary, but do not overlap.
Re:Pyenv – lets you easily switch between multiple versions ... by hermitdev on Monday March 25, 2024 @11:00AM (#39817155)
To add to this, with poetry, you basically do `poetry env use python3.12` to create a python virtualenv on python3.12 (you can use whatever python version pyenv supports, doesn't even have to be CPython).

The generated virtual env name is a little wonky. I'm not sure exactly what the scheme is, but it's basically `$(package)-$(some sort of hash?)-$(pyversion)`. I can't speak for all tools, but at least VS Code detects the poetry env and suggests it (and indicates it as a Poetry env) when you go to configure the project interpreter.

Re:Pyenv – lets you easily switch between multiple versions ... by bootsmann on Monday March 25, 2024 @11:45AM (#39817784)
You can use the poetry config to enable poetry putting the virtualenv into the project folder itself, which allows most IDEs to discover it.