3 ms·
Python should just do what JavaScript does and install all dependencies to a project-local folder.
by nicoburns 6y ago
Python should just do what JavaScript does and install all dependencies to a project-local folder.
- StreamBright 6y agoNot sure if JavaScript has anything that any other language or development tool should copy.
- wilsonrocks 6y agoIt is a mess... But you can often get a project running an awful lot quicker than in python
- notdonspaulding 6y agoTrue, but if that's the metric we're basing our language choice off of then we should all go back to PHP.
- PalzyPunk 6y agoYeah no kidding. I prefer it as a prototyping language. Unfortunately, I work in networking, and it's become the raison d'etre for our "DevOps". At least we're not using Ansible anymore... :|
- nicoburns 6y agoJavaScript's package management is significantly better than Pythons: - There's one tool to use, and it comes pre-installed - You don't have to deal with virtualenvs or packages from different projects conflicting. - Native code dependencies "just work".
- dboreham 6y agoThat one tool must be yarnnpmgypbabelwebpack?
- toyg 6y ago> You don't have to deal with virtualenvs or packages from different projects conflicting. That's only because you're basically assured there will be conflicts inside any single project. Every time I install anything via npm I get a boatload of warnings about insecure dependencies, which are effectively impossible to fix without breaking the whole mountain of hacks. There are good deployment stories out there. JS is not one of them.
- nicoburns 6y ago> That's only because you're basically assured there will be conflicts inside any single project. That's not an issue with the package management though, that's an issue with the quality of the packages themselves. The JS ecosystem does have issues there. But the tooling itself is good.
- HelloNurse 6y agoYou are assuming there is a "project", but Python code with massive dependencies can (and often should) be a bare script in an arbitrary folder that runs by invoking the Python interpreter on it, without "installing" anything except missing dependencies.
- hctaw 6y agoThat's not a bare script then, it's a project with dependencies that need to be installed. This misunderstanding is how you fuck up a developer environment.
- IgorPartola 6y agoAlmost nothing should do what JavaScript does, not even JavaScript. Of all the interpreted languages I’ve used, JS has the single worst ecosystem for running production code. If your experience is primarily with JS, do yourself a favor and try to grok other languages and ecosystems.
- StavrosK 6y agoIt does: https://www.python.org/dev/peps/pep-0582/ https://www.python.org/dev/peps/pep-0582/ Though, as the sibling comments say, it's debatable whether it should.
- BiteCode_dev 6y agoThat's literally what the article is about.
- hctaw 6y agoI'm surprised this is getting downvoted. This is the only sane way to manage dependencies. They must be relative to the thing you care about. There are tradeoffs for sure, like the ridiculous sizes of those directories on development machines. But a giant SSD is cheaper than my time resolving dependency issues on user machines.
- paulie_a 6y agoThey essentially are. Not in the actual directory but in the virtual env and not cluttering up your project directory. This is superior to JavaScript in my opinion No language should replicate anything JavaScript does when it comes to package management