Hacker News new | ask | show | jobs
by krageon 1902 days ago
> quite pesky

I've never had a bigger packaging nightmare than for Python and at this point I've worked with a substantial spread of available languages. It's simply embarrassing, especially because I used to like recommending it to people.

3 comments

The C Language thanks you for your propaganda.
C is the original language where you can reliably build an executable and ship it as a single file where it will run with no extra dependencies not already on the target system.
The C language may be complex to setup an environment. But once you have the build system complete, there are mature tools to create and distribute your artifacts. That is not the case with Python.
Python is downstream of C. Anyway you can package a C application, you can package a Python application (with some massaging).

But still, python has no mature tools for distribution? From wheels to pyinstaller to Kivy, you're just wrong.

> Anyway you can package a C application, you can package a Python application

While true, this means that packaging Python is harder than a typical C application, and requires knowledge of the C building process. That's not what people have in mind when installing Python software.

The methods you mention are exactly the reason why it is so complicated. Everyone wants to use their own method to install Python software.

There is no python distribution system that will allow me to create a binary for MacOS or Windows without running MacOS or windows, which is only one of the many problems with the existing solutions. Yes, I'm aware of the why. It just shouldn't matter to me.

That said, there's about a million packaging systems and most of them don't offer anything materially different from the others (except in weird edge cases that aren't advertised). The space is involved and annoying. It's emphatically not at all like C, which has very strong and well-documented defaults that do the things you expect (usually).

One of the main reasons I xnay any deployment of any python code to any production environments ever. It's sad and embarassing.
>xnay

Just FYI it's actually ixnay which is Pig Latin for nix, which of course means to cancel or pre-empt.

Agreed. Python is one of the worst languages in the sense of packaging and distributing code. It is incredible how bad they manage to make the whole process. And it is not for lack of effort, they have attempted several things, but the end result is complete confusion. Every year they come with a new way to solve the packaging problem, but in the end the result is just more complexity.
It won't ever be fixed until Python C API remains in it's current form. The problem aren't pure python extension, but you can't do anything sane once part of your application is not Python.
I'm sure this is part of the issue, but packaging even pure python modules is harder and more confusing than necessary. I've been saying this at least since I left for the relatively greener pastures of Node nearly a decade ago. Python fans have always had plenty of advice ready to contradict my impressions, but their advice has changed a great deal over the years. That whole time, "npm publish" has just worked, when it's even necessary at all. Node just works better.