spez,

Pip has a good looking loading thingy though.

Gallardo994,

So noone mentioned how awesome vcpkg is yet?

Andrew15_5,
@Andrew15_5@mander.xyz avatar

npm bad, pnpm good.

Sprout4426,

I really dislike pnpm, if everyrhing you do is install and build then if doesnt matter what you use, if you do anything complex pnpm will come back to bite you. Yarn is a good middle ground

Andrew15_5,
@Andrew15_5@mander.xyz avatar

You literally didn’t gave any arguments why you really dislike pnpm. The most obvious benefit is several times faster installations. It also have resolved some peer dependencies (I don’t remember details).

olutukko,

What’s the difference? I’m currently doing my web developement 2 course where we started using react so I’m typing npm to terminal all the time :D

Andrew15_5,
@Andrew15_5@mander.xyz avatar

Check out pnpm.io

spiderplant,

Bun best

TheAnonymouseJoker,
@TheAnonymouseJoker@lemmy.ml avatar

I avoid NPM after node-ipc Ukrainian malware incident.

dan,
@dan@upvote.au avatar

NuGet (for C# / .NET) is far better than npm.

Ineocla,

And it has a cool name

savedbythezsh,

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

Alfika07,

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.

Fashim,

NPM is ghastly though

gronjo45,

Memes like this make me ever more confused about my own software work flow. I’m in engineering so you can already guess my coding classes were pretty surface level at least at my uni and CC

Conda is what I like to use for data science but I still barely understand how to maintain a package manager. Im lowkey a bot when it comes to using non-GUI programs and tbh that paradigm shift has been hard after 18 years of no CLI usage.

The memes are pretty educational though

goatbeard,

Try not to learn too much from memes, they’re mostly wrong. Conda is good, if you’re looking for something more modern (for Python) I’d suggest Poetry

Pantoffel,

Tbh, I’m always ending up having issues using poetry and conda. I prefer using penv and pip.

mog77a,
@mog77a@lemmy.ml avatar

100% this. I remember really really trying to get the hang of them and eventually just giving up and doing it manually every time. I somehow always eventually mess something up or god forbid someone who isn’t me messes it up and I end up spending 4 hours dependency hunting. Venv and pip while still annoying are at least reliable and dead simple to use.

However, a container is now my preferred way of sharing software for at least the past 6 years.

Pantoffel,

Yup. A container i slow to rebuild, but at least the most robust. This is my preferred way to share python code when there are system dependencies involved.

gronjo45,

Never have heard of Poetry, but I’ll check it out tonight! I pretty much exclusively coded in Python and Julia up until I got out of uni. I learned after a couple of months of insanity swapping kernels, init systems, distributions and learning everything about file systems only leads to further insanity and productivity hindrance.

Something something recommending someone who doesn’t know what a shell is to use emacs and make a Lua/Neovim config. Thanks for the tip!

Swedneck,
@Swedneck@discuss.tchncs.de avatar

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.

NBJack,

It’s all fun and games until the wheel variant you need for your hardware acceleration package conflicts with that esoteric math library you planned on using.

Skadabucci,

This isn’t a pip issue though. Either these packages work together and the packaging is wrong, or they don’t work together.

neosheo,

Isn’t this why you use venv?

skullgiver, (edited )
@skullgiver@popplesburger.hilciferous.nl avatar

deleted_by_author

  • Loading...
  • barsoap,

    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?

    someacnt,

    Idk, maybe you can share the common packages across projects. (That can never go wrong, right? /s)

    barsoap,

    Sources are shared, sharing compile-time artefacts is done within workspaces.

    someacnt,

    Oh… I did mean sharing comptime artifacts

    Anafabula,
    @Anafabula@discuss.tchncs.de avatar

    You can globally share compile artifacts by setting a global target directory in the global Cargo config.

    In $HOME/.cargo/config.toml:

    
    <span style="color:#323232;">[build]
    </span><span style="color:#323232;">target-dir = "/path/to/dir"
    </span>
    

    The only problems I had when I did it where some cargo plugins and some dependencies with build.rs files that expected the target folder in it’s usual location.

    hatchet,

    I actually vastly prefer this behavior. It allows me to jump to (readable) source in library code easily in my editor, as well as experiment with different package versions without having to redownload, and (sort of) work offline too. I guess, I don’t really know what it would do otherwise. I think Rust requires you to have the complete library source code for everything you’re using regardless.

    I suppose it could act like NPM, and keep a separate copy of every library for every single project on my system, but that’s even less efficient. Yes, I think NPM only downloads the “built” files (if the package uses a build system & is properly configured), but it’s still just minified JS source code most of the time.

    Espi,

    With python and virtualenv you can also keep the entire source of your libraries in your project.

    Pipoca,

    Python virtual environments feel really archaic. It’s by far the worst user experience I’ve had with any kind of modern build system.

    Even a decade ago in Haskell, you only had to type cabal sandbox init only once, rather than source virtualenv/bin/activate.sh every time you cd to the project dir.

    I’m not really a python guy, but having to start touching a python project at work was a really unpleasant surprise.

    Cwilliams,

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

    ExLisper,

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

    Cwilliams,

    Well I guess you could say the tools that integrate with pip are really good, then

    wasabi,

    Just use poetry then

    fushuan,

    It’s not that confusing. There’s like 5 main different tools in total, what are you going to code if you can’t even set up the workspace? That’s much simpler than an installation that depends on cuda or spark, and those only require setting up environment variables after installation anyway.

    As a programmer you’ll encounter several redundant libraries and tools in your life where each has an edge in some use cases and you’ll learn to use most to be able to adapt to the different projects you encounter, python’s package manager tools are simply one of those.

    ExLisper,

    Of course there are more redundant tools. It doesn’t make pip suck any less though.

    danielquinn,
    @danielquinn@lemmy.ca avatar

    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.

    wraithcoop,

    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.

    AVincentInSpace,

    Is there a python 3 package that polyfills to Python 2?

    Plenty of 'em. You ever heard of the six library?

    christophski,

    I genuinely don’t get the hate for pip, been using it for 5 years and never had an issue

    felbane, (edited )

    If this is from the perspective of a hobbyist or brand new Python dev, that’s a fair opinion to have, I suppose.

    That said, if you’re using Python in a professional capacity, you really need to learn how to use the toolchain properly.

    Python packaging and virtual environments are not difficult to understand, and I’d wager based on your comments elsewhere in this thread that your frustrations are born from not taking the time to understand why following the instructions from a fourteen-year-old blog post aren’t working.

    99.99% of the time, the fault isn’t with pip, it’s with the maintainer of the broken package you’re trying to use.

    CapeWearingAeroplane,

    I have to agree, I maintain and develop packages in fortrat/C/C++ that use Python as a user interface, and in my experience pip just works.

    You only need to throw together a ≈30 line setup.py and a 5 line bash script and then you never have to think about it again.

    Cornelius,

    They’re not difficult by any means.

    But they are tedious when compared to other solutions.

    Scribbd,

    If we talk about solutions: python has plenty. Which might be overwhelming to the user.

    I use Direnv to manage my python projects. I just have to add layout pyenv 3.12.0 on top and it will create the virtual environment for me. And it will set my shell up to use that virtual environment as I enter that directory. And reset back to default when I leave the directory.

    But you could use pipenv, poetry, pdm, conda, mamba for your environment management. Pip and python do not care.

    ExLisper,

    This article someone linked is not 14 years old and it perfectly describes the mess python and pip are: chriswarrick.com/…/how-to-improve-python-packagin…

    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.

    GBU_28,

    Why not read the official python docs?

    NBJack,

    Hahaha!..

    Oh shit, you’re serious.

    GBU_28,

    They pretty simply describe how to handle a venv, pip, reqs, etc.

    NBJack,

    Friend, while I appreciate the time and effort on the docs, it has a rather tiny section on one of the truly worst aspects of pip (and the only one that really guts usability): package conflicts.

    Due to the nature of Python as an interpreted language, there is little that you can check in advance via automation around “can package A and package B coexist peacefully with the lowest common denominator of package X”? Will it work? Will it fail? Run your tool/code and hope for the best!

    Pip is a nightmare with larger, spawling package solutions (i.e. a lot of the ML work out there). But even with the freshest of venv creations, things still go remarkably wrong rather quick in my experience. My favorite is when someone, somewhere in the dependency tree forgets to lock their version, which ends up blossoming into a ticking time bomb before it abruptly stops working.

    Hopefully, your experiences have been far more pleasant than mine.

    jjjalljs,

    If you’re using a manually managed venv, you need to remember to activate it, or to use the appropriate Python.

    That really doesn’t seem like a big ask.

    I’ve been using python professionally for like 10 years and package management hasn’t really been a big problem.

    If you’re doing professional work, you should probably be using docker or something anyway. Working on the host machine is just asking for “it works on my machine what do you mean it doesn’t work in production?” issues.

    ExLisper,

    No, actually most devs don’t use docker like that. Not java devs, not JS devs, not rust devs. That is because maven, npm and cargo manage dependencies per project. You use it for python exactly because pip does it the wrong way and python has big compatibility issues.

    barsoap,

    The only time I ever interacted with python packaging was when packaging for nixos. And I can tell you that the whole ecosystem is nuts. You have like ten package managers each with thirty different ways to do things, none of which specify dependencies in a way that can be resolved without manual input because y’all have such glorious ideas as implementing the same interface in different packages and giving each the same name and such. Oh and don’t get me started on setup.py making http requests.

    TunaCowboy,

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

    fushuan,

    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.

    jelloeater85,
    @jelloeater85@lemmy.world avatar

    Seriously, I usually use Poetry these days for most projects, shit just works, build well and lets me distribute my code from PiPy just fine. Everything in one pyproject.yaml.

    Pantoffel,

    I like the pyproject.yaml, but checking dependencies with poetry takes 5 to 10 minutes for my projects.

    jelloeater85,
    @jelloeater85@lemmy.world avatar

    Yeah, that’s rough. Is it any faster w PipEnv?

    Pantoffel,

    It actually is almost as instant as you would expect

    jelloeater85,
    @jelloeater85@lemmy.world avatar

    Weird, Poetry gotta up their game then 😎

    luky,

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

    kameecoding,

    maven not on the list because they aren’t even playing the same sport.

    boratul,

    this is more abt programming languages than packages managers

    someacnt,

    Which allows me to bash python endlessly >.>

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmerhumor@lemmy.ml
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • khanakhh
  • rosin
  • Youngstown
  • everett
  • slotface
  • ngwrru68w68
  • mdbf
  • GTA5RPClips
  • kavyap
  • thenastyranch
  • cisconetworking
  • megavids
  • cubers
  • normalnudes
  • InstantRegret
  • Durango
  • tacticalgear
  • tester
  • osvaldo12
  • provamag3
  • anitta
  • modclub
  • Leos
  • JUstTest
  • lostlight
  • All magazines