News for hackers. Stuff that matters.
Re:My Python Development Environment, 2020 Edition by lone_haxx0r on Monday November 11, 2019 @08:45PM (#21510779)
Yes. As someone who has never dove deep into python, but has had some contact with it: the package manager ecosystem is the #1 thing keeping me away from it.

npm sucks and all, but at least it just works and doesn't get in my way as much.

Re:My Python Development Environment, 2020 Edition by int_19h on Tuesday November 12, 2019 @01:26AM (#21511971)
Anecdotally, I've had more Node packages with native code in them fail to build for me when installed via npm, than Python packages with native code fail when installed via pip. That whole node-gyp thing is a huge mess.
Re:My Python Development Environment, 2020 Edition by workthrowaway on Tuesday November 12, 2019 @08:38AM (#21513952)
> npm sucks and all, but at least it just works and doesn't get in my way as much.

used many package managers: pip, gem, go, npm, composer, etc... npm is the only one i have recent memories of having to kill & the only one that makes the fan go off (well okay most c/c++ do that too...)

quite frankly surprised by what i am seeing about python here. i have never been into the new stuff, pipenv, poetry, pipx, etc... maybe that's where the bad experience is coming from? i even don't know when and why it got so complex...

Re:My Python Development Environment, 2020 Edition by heyoni on Monday November 11, 2019 @09:59PM (#21511166)
What does npm do that python can’t? I’m curious.
Re:My Python Development Environment, 2020 Edition by Too on Tuesday November 12, 2019 @01:01AM (#21511863)
npm is equivalent to combining pip and virtualenv into a single tool. This gives better ergonomics when switching between projects since you never have to "activate" your environment, it's always activated when standing in the project directory.
Re:My Python Development Environment, 2020 Edition by Pandabob on Tuesday November 12, 2019 @01:45AM (#21512043)
Isn't this what Pipenv does? What has been a downer for me is that many of the cloud providers do not support pipfiles in their serverless app services (Elastic Beanstalk, App Engine etc.)
Re:My Python Development Environment, 2020 Edition by Pandabob on Tuesday November 12, 2019 @06:53AM (#21513386)
On second thought, at least on GCP I should be able to put the pipfiles into .gcloudignore and just update the requirements.txt file with each new commit using git hooks, build scripts or a ci/cd tool.
Re:My Python Development Environment, 2020 Edition by EdwardDiego on Tuesday November 12, 2019 @05:06AM (#21512949)
Yep, correct. Unfortunately I had quite a few issues with pipenv - mainly around its relationship with pip.
Re:My Python Development Environment, 2020 Edition by maksimum on Tuesday November 12, 2019 @01:12AM (#21511903)
That does sound convenient. I wonder if the virtualenv aspect is relevant though, i.e. do people really deploy npm apps outside of a container/isolation layer?

I imagine if you're deploying docker, you probably should be developing in docker (e.g. using PyCharm's remote interpreter/docker interpreter integration).

Re:My Python Development Environment, 2020 Edition by kart23 on Monday November 11, 2019 @08:53PM (#21510825)
Coming the opposite way: having started programming on python and only started doing node.js stuff recently, npm is awesome.
Re:My Python Development Environment, 2020 Edition by GuyOnMySpace on Tuesday November 12, 2019 @04:52AM (#21512878)
100% agree.

Coming from the scientific computing realm, I've only ever done "real" code in Python until a couple of weeks ago when I was forced to do some work in Typescript. Once I got over the initial worries about the best method to install npm to avoid Python-esque problems and gave nvm a try, I was very pleasantly surprised by the package management process and was able to just get on with the work.

I've tried various Python env management solutions in the past (mostly leaning towards conda), but had recently settled on just using separate LXC/LXD containers for each project.

Re:My Python Development Environment, 2020 Edition by j88439h84 on Tuesday November 12, 2019 @03:43AM (#21512575)
Poetry does all that stuff, as discussed in the article.