9 ms·
Every time I use Python I miss NPM and package.json.
by erokar 9y ago
Every time I use Python I miss NPM and package.json.
- na85 9y agoYou miss a package manager layered on top of the one already in your OS, one that's seemingly run by people with no clue what they're doing, is rife with security issues and can break your entire system as we saw today? I have no clue why a sane person would run npm.
- pbreit 9y agoAnd yet millions do?
- bussierem 9y agoMillions of people believe in chakras, horoscopes, and homeopathy - argument from popularity is a logical fallacy for good reason. Consensus does not equal quality.
- fatbird 9y agoAnd those same millions have been halted simultaneously in development around the world by the removal of key packages due to namespacing issues. Or, today, we find that running the newest version of npm under sudo can rewrite file system permissions across the entire hierarchy. What was that you were implying about how the choice of millions is probably pretty good?
- na85 9y agoMillions of people write their passwords down on little slips of paper next to their monitor. Are you implying that because something is popular, it's therefore "good"?
- cpburns2009 9y agoIn what way is NPM and package.json different from using pip and requirements.txt?
- zodiac 9y agonpm installs to a local node_modules file by default, whereas you have to set up a virtualenv or something similar to get that from pip
- masklinn 9y agoMy understanding is that's what pipenv gives you. You call pipenv install, it creates a venv if necessary and fills it. If you want to run tools within the env, you call pipenv run {command}.
- zodiac 9y agoYes, you're absolutely right, I was comparing npm specifically to pip (without any additional tools like pipenv).
- paddyoloughlin 9y agopipenv is like npm for python and Pipfile works similar to package.json. There's even a Pipfile.lock
- timc3 9y agoEvery time I use JavaScript/NPM/WebPack I miss my sanity.
- goodoldboys 9y agoLOL, hits too close to home.
- jordic 9y agolast project i setup parceljs with yarn and is so easyyyy.. :) nvm is my day saver :)
- jrs95 9y agoHell, prior to pipenv being a thing, Python package management made me miss Maven of all things!
- jessaustin 9y agoNot having done anything in python in a few years, it is nice to learn that it's catching up. It may be hoped that the npm-bashers will learn to appreciate the new features available for python.
- oh-kumudo 9y agoWhy? What NPM can achieve but pip cannot? You can export requirements.txt easily. NPM downloads some many seemingly useless stuff, makes the node_modules directory so bloated, pip is like a breeze in comparison to that.
- jorge-fundido 9y agoFor that flavor, maybe try: python3 -m pip install -t .pip ... export PYTHONPATH=".pip:$PYTHONPATH" Use whatever directory name you prefer instead of .pip. Mucking with PYTHONPATH is a bit dirty.