r/programmingmemes 27d ago

Python hate train

Post image
255 Upvotes

44 comments sorted by

45

u/Lachee 27d ago

A package manager that can only globally installs packages is next to useless.

"Oh venv fixes that!" Copying python for each project is not a fix. That's insanity. Imagine if we had to install node for each project we wanted?

3

u/Independent_Zone6816 27d ago

Any known fix for this? Like in nodejs we have options like yarn and npm, so do we have a package manager that actually works in python?

8

u/Insomniac_Coder 27d ago

Conda

uv (my personal choice)

1

u/Doctor429 27d ago

conda still duplicates the entire python runtime per environment. But still, I've had less issues with Conda than venv.

1

u/Insomniac_Coder 27d ago

It does

I think uv does too. Unless I am on a specific version of python. Last week I was working on 3.10 then it had downloaded in other cases, it just duplicates python from other venv

1

u/crusoe 24d ago

Conda is giant flaming pile.

1

u/Insomniac_Coder 24d ago

That's why I left it

1

u/Nightwyrm 24d ago

uv is the only Python package manager worth using. And that’s not a hype train thing.

1

u/Tolik1111 22d ago

The best solution for reproducable builds is nix.

3

u/cozysilk 27d ago

Dude, you’ve basically described `node_modules`. The only difference is that Python copies a link to the interpreter and a couple of libraries, while Node.js downloads half the internet-and a black hole to boot -for every “Hello World.” My SSD sends you its regards.

0

u/NoPrinterJust_Fax 23d ago

Ever heard of containers?

11

u/cozysilk 27d ago

You skipped the part where, in desperation, you create a 15th virtual environment, and then forget which one has what installed, so you just reinstall Windows

4

u/nickos33d 27d ago

Even though you are on Mac

7

u/Savings-Ad-1115 27d ago

Want to jump the train while I'm not too late.

Recently, I was trying to install python 3.14.4 on Ubuntu 20.04 in WSL1. test_re fails to open a socket because WSL1 doesn't support some specific socket options.

WTF they need a socket to test regular expressions?

8

u/thecratedigger_25 27d ago

That is what made me quit python. Moved on to C# now.

Nuget package manager is goated.

7

u/Insomniac_Coder 27d ago

Try uv

It has copied the requirement mechanism from Nods using a toml file.

2

u/Connect_Detail98 27d ago

uv is the npm of python. Finally something that just freaking works.

It's insane that it took this long to have something functional for Python.

2

u/Insomniac_Coder 27d ago

It was written in rust🫠

1

u/Connect_Detail98 27d ago

Yeah, maybe I wasn't clear, I'm also recommending uv. It's the only good option.

2

u/Insomniac_Coder 27d ago

I was pointing to the fact that you said that atleast something good came to python and my point was that it isn't even written in python

2

u/Connect_Detail98 27d ago

I meant that Python finally has a good package manager. Not that it was written in Python.

2

u/Insomniac_Coder 27d ago

That's so damn true. Almost no dependency hell.

2

u/UpsetIndian850311 27d ago

there is not any choice for people working in AI/ML/Data science.

1

u/crusoe 24d ago

It's decent now. Before nuget it was shit too.

6

u/pyro57 27d ago

I'm a penetration tester, I use alotnof different scripts and tools written in a variety of languages, but python is one of the most popular. Python dependency management sucks so bad. I was on an internal pentest and got to the point where I needed to review the webservers hosted on the internal network. There was over 1000 to check. Oh no worries there's tools available to take screenshots of a list of urls that I can use to find the ones that are actually interesting! The three I knew about were all python scripts. Dependency hell introduced itself on all three, in the end writing my own in rust was easier than dealing with the dependency issues I was having. Now I have one that works reliably and uses a language with sane dependency handling.

2

u/No-Newspaper8619 26d ago

You're a what?

6

u/serendipitousPi 26d ago

A hacker that asks for consent before penetrating a system.

3

u/Scared_Spyduck 27d ago

Tried to get into AI learning with simple stupid games. I never got that far but hate python now. Absolutly hate python.

2

u/Spiritual_Detail7624 26d ago

Cargo my goat

2

u/serendipitousPi 26d ago

Peak mentioned

1

u/[deleted] 27d ago

[removed] — view removed comment

1

u/oxwilder 27d ago

til the greater-than bracket creates a quote block

1

u/Achim63 26d ago

For my personal scripting needs, I changed to good old Perl because of that version an venv hassle. Or Swift, which is rather similar to Python - and faster when compiled.

1

u/nimrag_is_coming 26d ago

Open source projects with no binary releases are always awful to download. Half the time you install everything correctly and it still doesn't compiler cause the compiler keeps finding an error in the source code

1

u/crusoe 24d ago

Python has somehow gotten the absolute worst package system now. There are like 6 different managers now. 

1

u/Tolik1111 22d ago

Typical dependency hell. Nix solves that.

0

u/Valuable_Leopard_799 27d ago

This showcases two problems, some package managers can't handle two separate versions of a package being installed, and most language package managers don't install system dependencies.

Both of which are more or less solved if you use the right tools.