Re:My Python Development Environment, 2018 Edition
by erokar on Thursday February 22, 2018 @01:22PM
(#16439904)
Every time I use Python I miss NPM and package.json.
[ Parent
| on HN ]
Re:My Python Development Environment, 2018 Edition
by timc3 on Thursday February 22, 2018 @02:11PM
(#16440436)
Every time I use JavaScript/NPM/WebPack I miss my sanity.
Re:My Python Development Environment, 2018 Edition
by jordic on Thursday February 22, 2018 @04:14PM
(#16441448)
last project i setup parceljs with yarn and is so easyyyy.. :) nvm is my day saver :)
Re:My Python Development Environment, 2018 Edition
by goodoldboys on Thursday February 22, 2018 @03:26PM
(#16441063)
LOL, hits too close to home.
Re:My Python Development Environment, 2018 Edition
by na85 on Thursday February 22, 2018 @01:35PM
(#16440036)
You 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.
Re:My Python Development Environment, 2018 Edition
by pbreit on Thursday February 22, 2018 @02:00PM
(#16440324)
And yet millions do?
Re:My Python Development Environment, 2018 Edition
by bussierem on Thursday February 22, 2018 @02:22PM
(#16440546)
Millions of people believe in chakras, horoscopes, and homeopathy - argument from popularity is a logical fallacy for good reason. Consensus does not equal quality.
Re:My Python Development Environment, 2018 Edition
by fatbird on Thursday February 22, 2018 @02:48PM
(#16440781)
And 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?
Re:My Python Development Environment, 2018 Edition
by na85 on Thursday February 22, 2018 @03:30PM
(#16441100)
Millions 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"?
Re:My Python Development Environment, 2018 Edition
by paddyoloughlin on Thursday February 22, 2018 @01:42PM
(#16440109)
pipenv is like npm for python and Pipfile works similar to package.json.
There's even a Pipfile.lock
Re:My Python Development Environment, 2018 Edition
by Matumio on Thursday February 22, 2018 @03:24PM
(#16441052)
pipenv is more like yarn (same version locking concept)
Re:My Python Development Environment, 2018 Edition
by jxub on Thursday February 22, 2018 @03:46PM
(#16441227)
If I remember correctly the newest npm does the same though.
Re:My Python Development Environment, 2018 Edition
by csmiller on Thursday February 22, 2018 @04:40PM
(#16441660)
Yeah, npm and yarn are pretty close at the moment. Yarn had a big advantage when it was first release, but npm seems to have caught up.
Re:My Python Development Environment, 2018 Edition
by cpburns2009 on Thursday February 22, 2018 @01:41PM
(#16440092)
In what way is NPM and package.json different from using pip and requirements.txt?
Re:My Python Development Environment, 2018 Edition
by zodiac on Thursday February 22, 2018 @01:58PM
(#16440304)
npm 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
Re:My Python Development Environment, 2018 Edition
by masklinn on Thursday February 22, 2018 @02:15PM
(#16440472)
My 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}.
Re:My Python Development Environment, 2018 Edition
by zodiac on Thursday February 22, 2018 @02:34PM
(#16440650)
Yes, you're absolutely right, I was comparing npm specifically to pip (without any additional tools like pipenv).
Re:My Python Development Environment, 2018 Edition
by oh-kumudo on Thursday February 22, 2018 @03:38PM
(#16441159)
Why? 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.
Re:My Python Development Environment, 2018 Edition
by jrs95 on Thursday February 22, 2018 @02:45PM
(#16440760)
Hell, prior to pipenv being a thing, Python package management made me miss Maven of all things!
Re:My Python Development Environment, 2018 Edition
by jessaustin on Thursday February 22, 2018 @07:02PM
(#16442829)
Not 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.
Re:My Python Development Environment, 2018 Edition
by jorge-fundido on Thursday February 22, 2018 @09:33PM
(#16443726)
For 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.