7
submitted 1 month ago by [email protected] to c/[email protected]

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 new old
[-] [email protected] 8 points 1 month 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 1 month ago* (last edited 1 month 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 1 month ago

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 1 month ago

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

[-] [email protected] 1 points 1 month ago

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

this post was submitted on 07 May 2025
7 points (88.9% liked)

micro-blog-[ish]

103 readers
1 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