Sorry Python but it is what it is.

top 50 comments

sorted by: hot top controversial new old
[+] 125 points 2 years ago* (last edited 2 years ago) (10 children)
  • [–] 53 points 2 years ago (1 child)

    That's not a controversial opinion. I'd say it's worse than pip. At least pip doesn't put nag messages on the console or fill up your hard drive with half a gigabyte of small files. OP is confused.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 7 points 2 years ago* (last edited 2 years ago) (9 children)

    In my experience npm is not great but it does work most of the time. I just tried installing bunch of stuff using pip and NONE of them worked. Python is backwards compatibility hell. Python 2 vs 3, dependencies missing, important libraries being forked and not working anymore. If the official installation instructions are 'pip install X' and it doesn't work then what's the point?

    npm has A LOT of issues but generally when I do 'npm i' i installs things and they work.

    But the main point is that cargo is just amazing :)

    P.S. Never used ruby.

  • source
  • parent
  • hideshow 12 child comments
  • [–] 42 points 2 years ago (3 children)

    Well there’s your problem lol.

    Don’t use 2 for anything, it’s been “dead” for almost 4 years.

  • source
  • parent
  • hideshow 4 child comments
  • load more comments (2 replies)
  • load more comments (6 replies)
  • load more comments (7 replies)
    [–] 73 points 2 years ago (3 children)

    So you are saying that npm is better than pip?? I'm not saying pip is good, but npm?

  • source
  • hideshow 4 child comments
  • [–] 35 points 2 years ago (4 children)

    npm has a lockfile which makes it infinitely better.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 21 points 2 years ago (6 children)

    pip also has lock files

    pip freeze > requirements.txt

  • source
  • parent
  • hideshow 7 child comments
  • [–] 7 points 2 years ago (1 child)

    Would that just create a list of the current packages/versions without actually locking anything?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 8 points 2 years ago* (4 children)

    Would that just create a list of the current packages/versions

    Yes, and all downstream dependencies

    without actually locking anything?

    What do you mean? Nothing stops someone from manually installing an npm package that differs from package-lock.json - this behaves the same. If you pip install -r requirements.txt it installs the exact versions specified by the package maintainer, just like npm install the only difference is python requires you to specify the "lock file" instead of implicitly reading one from the CWD

  • source
  • parent
  • hideshow 4 child comments
  • load more comments (4 replies)
  • load more comments (5 replies)
  • load more comments (3 replies)
  • load more comments (2 replies)
    [+] 53 points 2 years ago* (last edited 2 years ago) (4 children)
  • [–] 10 points 2 years ago (4 children)

    cached copies of crates that you downloaded

    Meh, what else is it supposed to do, delete sources all the time? Then people with slow connections will complain.

    Also size-wise that's actually not even much (though they could take the care to compress it), what actually takes up space with rust is compile artifacts, per workspace. Have you heard of kondo?

  • source
  • parent
  • hideshow 4 child comments
  • load more comments (4 replies)
  • load more comments (3 replies)
    [+] 50 points 2 years ago* (last edited 2 years ago) (5 children)
  • [–] 38 points 2 years ago (1 child)

    This is programmer humor, 95% of the people here still get defeated by semicolons, have never used a debugger, and struggle to exit vim.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 14 points 2 years ago (5 children)

    Sometimes I wish there was a community for more advanced users, where the concept of deciding on the best build tool chain per project is not a major hurdle. Venvs? Nbd. Pipenv? Nbd. Conda/mamba/micromamba? Nbd. Pure pip? Oh boy, I hope it a simple one, but I'll manage. Maven? Fml, but sure. Npm? Sure. "Complex" git workflows, no problem.

    Idk, that's just setting up the work environment, if your brains get squeezed by that I'm not sure if you will then be able to the actually code whatever its being asked of you. Some people...

    But yeah, this is a newbie space so I guess that we have to ignore some noise.

  • source
  • parent
  • hideshow 5 child comments
  • load more comments (5 replies)
  • [–] [S] 13 points 2 years ago (6 children)

    This article someone linked is not 14 years old and it perfectly describes the mess python and pip are: https://chriswarrick.com/blog/2023/01/15/how-to-improve-python-packaging/

    My favorite part is:

    Most importantly: which tool should a beginner use? The PyPA has a few guides and tutorials, one is using pip + venv, another is using pipenv (why would you still do that?), and another tutorial that lets you pick between Hatchling (hatch’s build backend), setuptools, Flit, and PDM, without explaining the differences between them

    But yes, following old blog post is the issue.

  • source
  • parent
  • hideshow 6 child comments
  • load more comments (6 replies)
  • load more comments (2 replies)
    [–] 33 points 2 years ago

    NPM is ghastly though

  • source
  • [–] 30 points 2 years ago

    npm is just plain up terrible. never worked for me first try without doing weird stuff

  • source
  • [–] 28 points 2 years ago* (7 children)

    I don't know what cargo is, but npm is the second worst package manager I've ever used after nuget.

  • source
  • hideshow 9 child comments
  • [–] 10 points 2 years ago (1 child)

    I've never had an issue with nuget, at least since dotnet core. My experience has it far ahead of npm and pip

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (5 replies)
    [+] 24 points 2 years ago (1 child)
  • [–] 19 points 2 years ago (2 children)

    This is why I use poetry for python nowadays. Pip just feels like something ancient next to Cargo, Stack, Julia, npm, etc.

  • source
  • hideshow 2 child comments
  • load more comments (2 replies)
    [–] 18 points 2 years ago (3 children)
    load more comments (3 replies)
    [–] 16 points 2 years ago

    What about CPAN?

    You can't even use it without the documentation of the program that you want to install because some dependencies have to be installed manually, and even then there's a chance of the installation not working because a unit test would fail.

  • source
  • [–] 14 points 2 years ago (1 child)

    i will get hated for this but: cargo > composer > pip > npm

  • source
  • hideshow 1 child comment
  • load more comments (1 reply)
    [–] 11 points 2 years ago (2 children)

    What's so bad about pip? Imho, the venv thing is really nice

  • source
  • hideshow 3 child comments
  • [–] [S] 10 points 2 years ago (5 children)

    vevn is not pip. The confusing set of different tools is part of the problem.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 19 points 2 years ago (1 child)

    cough npm,yarn,grunt,esbuild,webpack,parcel,rollup,lasso,rollup,etc.,etc.cough

    I'm not saying that Python's packaging ecosystem isn't complicated, but to paint JavaScript as anything other than nightmare fuel just isn't right.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 8 points 2 years ago (1 child)

    I don't think that's a fair comparison, the only two libraries that are related to the actual packaging system in that list is yarn and NPM. The rest of them have to do with the complexities of actually having your code runnable in the maximum number of browsers without issue. If python was the browser scripting language, it'd likely have the same issue.

    Is there a python package that transpiles and polyfills python3 to work in python 2? 2.7? 2.5?

    Also, unrelated to your comment, a lot of people are dunking on npm for the black hole that is node modules (which is valid), but also saying it's not pip's fault a lot of packages don't work. It's not npm's fault the package maintainers are including all these dependencies, and there are some 0-dependency packages out there.

  • source
  • parent
  • hideshow 1 child comment
  • load more comments (1 reply)
  • load more comments (4 replies)
  • load more comments (1 reply)
    [–] 10 points 2 years ago (3 children)

    the only time i've had issues with pip is when using it to install the xonsh shell, but that's not really pip's fault since that's a very niche case and i wouldn't expect any language's package manager to handle installing something so fundamental anyways.

  • source
  • hideshow 3 child comments
  • load more comments (3 replies)
    [–] 8 points 2 years ago (21 children)

    Bruh idk why the difference... Educate me?

  • source
  • hideshow 21 child comments
  • load more comments (21 replies)
    [+] 8 points 2 years ago
    [–] 7 points 2 years ago

    No one here has yet complained about Cocoapods and Carthage? I'm traumatized. Thank God for SwiftPM

  • source
  • [–] 7 points 2 years ago (5 children)
    load more comments (5 replies)
    load more comments
    view more: next ›