News for hackers. Stuff that matters.
Re:Ask HN: Why Did Python Win? by thesuperbigfrog on Tuesday August 29, 2023 @05:15PM (#37314219)
As evidenced by the unified Python library / dependency management system.
Re:Ask HN: Why Did Python Win? by shpx on Tuesday August 29, 2023 @05:31PM (#37314426)
I use pip 100% of the time
Re:Ask HN: Why Did Python Win? by thesuperbigfrog on Tuesday August 29, 2023 @06:11PM (#37314817)
>> I use pip 100% of the time

What about pipenv, poetry, conda, setuptools, hatch, micropipenv, PDM, pip-tools, ActiveState platform, homebrew, or your Linux / BSD distro's package manager?

Re:Ask HN: Why Did Python Win? by bsder on Tuesday August 29, 2023 @06:30PM (#37314989)
As much as I love to rag on things, I would go so far as to say that the big problem with Python packaging is the fact that it tries to manage C/C++ packaging and integration.

If Python is only managing Python code, the issues to be solved are VASTLY simpler. Just about anything works.

Once it has to deal with dynamic libraries, compiled code, plugins, build systems, etc. the combinatorial explosion just makes life suck.

Re:Ask HN: Why Did Python Win? by thesuperbigfrog on Tuesday August 29, 2023 @07:51PM (#37315754)
Python is a victim of its own success and versatility.

It has become a better "glue code to solve your problem" than many other solutions and so people want to use it everywhere for everything.

It gets packaged in many different ways because it gets used in many different ways for many different purposes.

Re:Ask HN: Why Did Python Win? by bluGill on Tuesday August 29, 2023 @08:53PM (#37316247)
Packaging is a difficult problem and all attempts to simplify things fail to understand how complex the problem is and so fail in some way. (Attempts like .deb do okay by only focusing on a subset of the problem)
Re:Ask HN: Why Did Python Win? by shpx on Tuesday August 29, 2023 @08:40PM (#37316149)
[delayed]
Re:Ask HN: Why Did Python Win? by what-no-tests on Wednesday August 30, 2023 @12:16PM (#37324292)
You forgot about egg!
Re:Ask HN: Why Did Python Win? by selcuka on Tuesday August 29, 2023 @07:45PM (#37315716)
pip (with venvs, which is a built-in Python feature) covers 99% percent of all use cases.

Yes, its dependency resolution could have been better, and lock files are nice (which can be emulated using constraints [1]) but I don't understand why people are so busy writing alternatives. I work on pretty sophisticated codebases on a daily basis and haven't used anything but pip.

[1] https://pip.pypa.io/en/stable/user_guide/#constraints-files

Re:Ask HN: Why Did Python Win? by bowsamic on Wednesday August 30, 2023 @01:18AM (#37317977)
Good for you but many don’t. Most people I know use Anaconda and install things with Conda
Re:Ask HN: Why Did Python Win? by gaganyaan on Tuesday August 29, 2023 @09:50PM (#37316683)
Use Poetry to produce a lockfile (or whatever lockfile-producing tool you like), and then let Nix take the wheel. It solves the dependency problem not just for Python, but for your entire stack. I've been able to hand it off to my coworkers and have everything just work with a simple "nix-shell" command, even with a dependency tree chock full of gnarly ML libs.