this post was submitted on 07 May 2025
5 points (85.7% liked)

micro-blog-[ish]

82 readers
2 users here now

A place to say what you have to say, without requiring any context, theme, arguments, or ceremony. Be civil.

founded 6 months ago
MODERATORS
 

So maybe I'm spoiled by linux package managers, where you tell it to "upgrade" and things continue to work... to me that is just a natural expectation.

Well, it seems the python package manager (pip) will happily upgrade all your project's required dependencies, but not your optional dependencies... yet the old (incompatible) version is still visible at runtime.

Consequently, it seems to be an excepted norm in the python world that things may break after a "pip upgrade", at least on a single tool.

How do python devs put up with this? Apparently there are a bunch of hacks scattered across countless projects to test at runtime for incompatible deps, even though they have already dutifully specified the compatible version in the dependencies list.

What a mess.

top 5 comments
sorted by: hot top controversial new old
[–] Piatro 6 points 3 weeks ago

My (limited) experience with the python ecosystem is: "Of course the built in package manager doesn't work, you idiot, you should use X" where "X" is a different package manager and no two python devs agree on which is "best" or "most common".

[–] [email protected] 2 points 3 weeks ago* (last edited 3 weeks ago)

Depending on the situation and context I'll use any combination of Poetry, virtual environments, and pipx. And more recently (and more often) I'll just containerize the service and run it with Docker or Podman.

[–] [email protected] 2 points 3 weeks ago (1 children)

pip is insufficient, this is known.

Use uv or pipenv, they're faster, better, and more clear when things go wrong.

[–] [email protected] 1 points 2 weeks ago

You are saying that I can use uv yo install packages.

[–] [email protected] 1 points 3 weeks ago

Put it in a docker container, if it breaks, just restart. Python is a mess, gotta keep it contained