Live data from Hacker News

PYX: The next step in Python packaging

astral.sh

231–240 of 479 posts

Re: PYX: The next step in Python packaging

#231
post #56

I lost track of how many different ways to install a Python library there are at the moment.

Much better than the Node a handful of years back. Everybody used NPM, everybody switched to Yarn, everybody switched back to NPM.

pnpm for lif

The idea that every single directory for every single project down 18 subdirectories deep should have their own copy of is-even is insanity

Re: PYX: The next step in Python packaging

#232

Earlier quoted context omitted.

Your information is out of date. > there's no way to do an installation dry run without pre-downloading all the packages (to get their dep info) Not true for wheels; PyPI implements https://peps.python.org/pep-0658/ here. You can pre-download just the dependency info instead. For sdists, this is impossible until we can drop support for a bunch of older packages that don't follow modern standards (which is to say, inc…

Ah interesting, thanks for that! I was frustrated once again recently to note that `pip install --dry-run` required me to pre-download all packages, so I assumed nothing had changed.

You could do worse than to start using --only-binary=:all: by default. (It's even been proposed as default behaviour: https://github.com/pypa/pip/issues/9140) Even if you can't actually install that way, it will point out the places where sdists are needed.

In principle, separate metadata availability should still at least be possible for most sdists eventually. But I'm not the one calling the shots here.

Re: PYX: The next step in Python packaging

#233
post #127

Probably the more useful blog post: https://astral.sh/blog/introducing-pyx

Thanks that’s bit less cryptic than the linked page. Still don’t get how they are solving what they claim to solve.

I'm guesssing from the UV page [0] its mainly if the speed of pip is a problem for you?

[0] https://docs.astral.sh/uv/

Re: PYX: The next step in Python packaging

#235

Earlier quoted context omitted.

I've been dealing with python vs debian for the last three hours and am deeply angry with the ecosystem. Solved it is not. Debian decided you should use venv for everything. But when packages are installed in a venv, random cmake nonsense does not find them. There are apt-get level packages, some things find those, others do not. Names are not consistent. There's a thing called pipx which my console recommended for m…

from what I hear uv is the "solved" and venv by hand is the old way

These tools together solve a fraction of the problen. The other parts of the problem are interfacing with classic c, c++ libraries and handling different hardware and different OSes. It is not even funny how tricky it is to use the same GPU/CUDA versions but with different CPU architectures and hopefully most people dont need to be exposed to it. Sometimes parts of the stack depends on a different version of a c++ library than other parts of the stack. Or some require different kernel modules or CUDA driver settings. But I would be happy if there was a standardized way to at least link to the same C++ libraries, hopefully with the same ABI, across different clusters or different OS versions. Python is so far from solved…

Re: PYX: The next step in Python packaging

#236
post #212

Earlier quoted context omitted.

I felt like python packaging was more or less fine, right up until pip started to warn me that I couldn't globally install packages anymore. So I need to make a billion venvs to install the same ml, plotting libraries and dependencies, that I don't want in a requirements.txt for the project. I just want packaging to fuck off and leave me alone. Changes here are always bad, because they're changes.

You can turn that off and allow global packages again if you want. Or install it with the os package manager or something simmilar

You assume the OS package manager I happen to be using even has packages for some of the libraries I want to use.

Re: PYX: The next step in Python packaging

#237
post #234

The real pyx is an absolutely wonderful graphing package. It's like Tex in that everything looks wonderful and publication-quality. https://pyx-project.org/gallery/graph/index.html

there's something about these comments ("name-collision") that drives me up the wall. do y'all realize multiple things can have the same name? for example, did you know there are many people with exactly the same names:

https://www.buzzfeed.com/kristenharris1/famous-people-same-n...

and yet no one bemoans this (hospitals don't consult name registries before filling out birth certificates). that's because it's almost always extremely clear from context.

> The real pyx

what makes that pyx any more "real" than this pyx? it's the extension of the language py plus a single letter. there are probably a thousand projects that could rightfully use that combination of letters as a name.

Re: PYX: The next step in Python packaging

#238
post #234

The real pyx is an absolutely wonderful graphing package. It's like Tex in that everything looks wonderful and publication-quality. https://pyx-project.org/gallery/graph/index.html

there's something about these comments ("name-collision") that drives me up the wall. do y'all realize multiple things can have the same name? for example, did you know there are many people with exactly the same names: https://www.buzzfeed.com/kristenharris1/famous-people-same-n... and yet no one bemoans this (hospitals don't consult name registries before filling out birth certificates). that's because it's almost…

it's the pyx you get with `pip install pyx`?

Re: PYX: The next step in Python packaging

#239

Earlier quoted context omitted.

uv is venv + insanely fast pip. I’ve used it every day for 5+ months and I still stare in amazement every time I use it. It’s probably the most joy I’ve ever gotten out of technology.

Installing packages it the most joy you've ever gotten outta tech? Not a project you built, or something you're proud of? Installing packages?

I know it's like everyone's lost their mind right ?

Re: PYX: The next step in Python packaging

#240

Can I ask a dumb question. Why does Ruby (for example) not have this problem, but python still can't ship a standard solution which isn't constantly changing and rolled up in some corporate offering?

Ruby is mostly used in web dev, where most if not all of your dependencies tend to be pure Ruby. Python is used heavily for DS/ML/AI, which is exactly the area where native code packages are necessary and prevalent. Worse yet is that those packages often involve GPU code, and things like CUDA bring their own complications. If you're writing web apps in Python, dependencies haven't really been a problem for a long tim…

  > Ruby is mostly used in web dev, where most if not all of your dependencies tend to be pure Ruby.
There is literally no such thing as a rails app that’s pure ruby. Rails depends on nokogiri, which is a libxml2 wrapper, and all activerecord database adapters are C bindings. Ruby development involves dealing with frequent native extension compilation, just like python.
Post reply on HN