6 ms·
Not sure this is still a valid critic of Python in 2024. Between pip, poetry and pyproject.toml, things are now quite good IMHO.
by Galanwe 2y ago
Not sure this is still a valid critic of Python in 2024.
Between pip, poetry and pyproject.toml, things are now quite good IMHO.
- Arcanum-XIII 2y agoAll is well, then, one day, you have to update one library. Some days later, in some woods or cave, people will hear your screams of rage and despair.
- Galanwe 2y agoBeen using python for 15 years now, and these screams were never heard. Dev/test with relaxed pip installs, freeze deployment dependencies with pip freeze/pip-tools/poetry/whateveryoulike, and what's the problem?
- neeleshs 2y agosame here. Been using python/pip for 10+ years and this was never a problem. In the java world, there is jar hell, but it was never a crippling issue, but a minor annoyance once a year or so. In general, is dependency management such a massive problem it is made to be on HN? Maybe people here are doing far more complex/different things than I've done in the past 20 years
- mixmastamyk 2y agoGuessing that folks who write such things are lacking sysad skills like manipulating paths, etc. It does take Python expertise to fix other issues on occasion but they are fixable. Why I think flags like ‘pip —break-system-packages’ are silly. It’s an optimization for non-users over experienced ones.
- arp242 2y agoI guess that depends from your perspective. I'm not a Python developer, but like many people I do want to run Python programs from time to time. I don't really know Rust, or Cargo, but I never have trouble building any Rust program: "cargo build [--release]" is all I need to know. Easy. Even many C programs are actually quite easy: "./configure", "make", and optionally "make install". "./configure" has a nice "--help". There is a lot to be said about the ugly generated autotools soup, but the UX for people just wanting to build/run it without in-depth knowledge of the system is actually quite decent. cmake is a regression here. With Python, "pip install" gives me an entire screen full of errors about venv and "externally managed" and whatnot. I don't care. I just want to run it. I don't want a bunch of venvs, I just want to install or run the damn program. I've taken to just use "pip install --break-system-packages", which installs to ~/.local. It works shrug. Last time I wanted to just run a project with a few small modifications I had a hard time. I ended up just editing ~/.local/lib/python/[...] Again, it worked so whatever. All of this is really where Python and some other languages/build systems fail. Many people running this are not $language_x programmers or experts, and I don't want to read up on every system I come across. That's not a reasonable demand. Any system that doesn't allow non-users of that language to use it in simple easy steps needs work. Python's system is one such system.
- simonw 2y ago"I don't want a bunch of venvs" That's your problem right there. Virtual environments are the Python ecosystem's solution to the problem of wanting to install different things on the same machine that have different conflicting requirements. If you refuse to use virtual environments and you install more than one separate Python project you're going to run into conflicting requirements and it's going to suck. Have you tried pipx? If you're just installing Python tools (and not hacking on them yourself) it's fantastic - it manages separate virtual environments for each of your installations without you having to think about them (or even know what a virtual environment is).
- arp242 2y agoManaging a farm of virtualenvs and mucking about with my PATH doesn't address the user-installable problem at all. And it seems there's a new tool to try every few months that really will fix all problems this time. And maybe if you're a Python developer working on the code every day that's all brilliant. But most people aren't Python developers, and I just want to try that "Show HN" project or whatnot. Give me a single command I can run. Always. For any project. And that always works. If you don't have that then your build system needs work.
- simonw 2y ago"Give me a single command I can run. Always. For any project. And that always works." pipx install X
- arp242 2y agoRight so; I'll try that next time. Thanks. I just go by the very prominent "pip install X" on every pypi page (as well as "pip install .." in many READMEs).
- simonw 2y agoYeah, totally understand that - pipx is still pretty poorly known by people who are active in Python development! A few of my READMEs start like this: https://github.com/simonw/paginate-json?tab=readme-ov-file#installation https://github.com/simonw/paginate-json?tab=readme-ov-file#i... ## Installation pip install paginate-json Or use pipx (link to pipx site) pipx install paginate-json But I checked and actually most them still don't even mention it. I'll be fixing that in the future.
- pletnes 2y agoThis is the truth right here. The issues are with people using (not officially) deprecated tools and workflows, plus various half baked scripts that solved some narrow use cases.