Hacker News new | ask | show | jobs
by ghshephard 2051 days ago
I often wonder what problem is being solved by Poetry, that pip with virtualenv(+wrappers) doesn't solve perfectly well. requirements.txt ensures you have the right version of everything in production, and virtualenv lets you explore various versions of libraries without risking any destabilization of your development environment.

I struggle to see what spending time looking at Poetry will yield in terms of any actual benefit, though I would love to be informed/educated otherwise.

2 comments

virtualenv always feels like a hack to me. Too many times I’ve forgotten to activate the virtualenv halfway through a project and now I’m troubleshooting all the problems I just caused with some packages installed in the virtualenv and some globally and oh half of them aren’t in my packages.txt so now I can’t remember which package I needed for this...

I don’t expect my dev tools to be idiot proof, but they should at least try to be “I’ve been hacking for 18 hours straight and I just need to commit this last line and I can finally go to bed” proof.

One thing that helps is: # Don't let people touch anything in the root environment export PIP_REQUIRE_VIRTUALENV=true

That prevents you from ever doing a pip install in your root environment.

I've got about 20 different pip environments, and virtualenvwrappers (workon xxxx) makes it pretty seamless for me to hop back and forth between sessions. I'm also pretty dedicated to doing all my work in tmux windows - so my state in a half dozen virtualenvs is changed by changing my window (which I've done a workon)

I guess what I'm really interested in is, "The last three years of my life I've used virtualenv/wrappers + pip, and haven't run into any problems. What can Poetry do for me, and why should I change my work habits? Genuinely interested in using new and better tools.

Same here. 20 years on python and I've never done anything more than clone a repo, venv and pip install -r requirements. And then cd && python -m to run the source code, maybe set PYTHONPATH in some cases.

I don't think I've even written a setup.py .

Obviously there's a whole world of development and deployment where these things are relevant, but there's also a massive world where nobody even understands what they are missing.

My current gig has a 9 year python repo, 3526 .py files over 228 megabytes, 13 (current) developers. It's all managed with virtuanenv/pip install. So - even larger projects seem to get by okay - would love to read something on Poetry that just says, "Here is why it's a lot better than virtualenv/pip"