←back to thread

741 points chirau | 7 comments | | HN request time: 0.969s | source | bottom
1. shpx ◴[] No.44358943[source]
For running scripts on my personal computer I really don't care for all the dependency management stuff. I just want a single, globally installed latest version of a library, like what pip does. I've never had the problem of an old script breaking, I guess because I just don't run that much software. These things for writing out explicit versions of everything and reinstalling libraries for every single project just add a lot of overhead, extra typing and an extra layer of complexity that I don't care for. I like just typing "pip install requests" and then being able to do "import requests" in any REPL or script for the next few years, occasionally running a Bash alias to upgrade all dependencies (which is a feature that pip incredibly still doesn't have, 14 years later).

I can see how if you've had issues with dependencies you would rave about systems that let you control down to the commit what an import statement actually means, but I like the system that requires the least amount of typing/thinking and I imagine I'm part of a silent majority.

replies(4): >>44359081 #>>44359761 #>>44361083 #>>44363642 #
2. chuckadams ◴[] No.44359081[source]
I've been out of the python world for a while now, but I would think a global install should just be a special case of a local install, one that's shared among scripts, which is basically how npm and yarn work. I'm kind of surprised uv doesn't support something like this already. Maybe it should be up to the distro to base the global python package management on uv then?
replies(1): >>44359134 #
3. shpx ◴[] No.44359134[source]
I think it does support it, like this

  uv pip install --system requests
but it's more typing. If I type 5 characters per second, making me also type "uv --system" is the same as adding 2 seconds of runtime to the actual command, except even worse because the chance of a typo goes up and typing takes energy and concentration and is annoying.
replies(1): >>44359200 #
4. chuckadams ◴[] No.44359200{3}[source]
If only there were a way to alias commands, eh?
5. globular-toast ◴[] No.44359761[source]
Word of warning, if you use Linux you can easily break your system like this. Many distros stop you being able to modify the system packages now but that's quite a recent development. You should look into doing user-level installs instead. Don't know about Mac. If you use Windows then you do you. It might break eventually but probably not irrecoverably.
6. oblio ◴[] No.44361083[source]
Python dependency management is a tragedy and it causes widespread pain, ergo the many solutions.

You are probably part of the silent majority because yes, most people have relatively simple needs for every popular tool.

7. akx ◴[] No.44363642[source]
And when you run the upgrade-all-dependencies script and some dependency has a semver-major/otherwise breaking upgrade, everything depending on it breaks at once.

Hopefully one of those things isn't your backup cronjob.