Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wouldn't it be easier for the end user if you used pip/PyPi? Essentially all Linux distros include Python, but there are very few that ship with Node.js installed by default.


I can only speak for myself, but my systems all prohibit installation of packages into the system Python namespace by default.


Yeah, I try to avoid "sudo pip install" for CLI utilities if I can (and discourage its use to others). I put ~/.local/bin on my PATH (nonstandard XDG -like convention) and use "pip install --user" instead.

I've seen too many Python environments hosed by folks who aren't Python experts to keep suggesting that "sudo pip install <CLI tool>" is a thing most users should be doing.


I use ~/.bin/ for what sounds like the same purpose. I'm not sure I'd call that a convention - it's just what made sense to me - but it does ease issues requiring that userspace executables be on my $PATH.


So you need to be root to write to /usr/local/bin/. How does NPM magically solve this? (pip has the `--user` flag to install for just the current user, as tom points out.)


It doesn't solve it, and I don't think I claimed it did - I simply inferred that I don't think installing it into the system (or user) Python is a good idea either.


Ah, I see, I misunderstood your comment. But I think pip gives you better options than NPM, which installs into either /usr/local/(...) or the current directory. The latter sounds like a mess waiting to happen.


And most of distros don't come with pip, so we're back at square one.


Python >= 2.7.9 or >= 3.4 ships with pip installed by default. Those versions are more than a year old now. What are you running, Slackware or something?


I would double check that if I was you. My Debian Jessie machine (from the official Vagrant box) reports Python 2.7.9. No pip.


I've many Debian servers without nodejs _and_ without python.

It requires conscious work as any other dependency, but it's possible (and convenient, if you don't depend on them).

So more than probably, I'll not install npm, to test a bash wrapper to a perl script, that does something that git itself can do without external dependencies.

But obviously, different persons have different concepts of the K.I.S.S. principle.

Being a perl script... why the author didn't use CPAN? it's available in all vanilla installs of Debian, CentOS, Ubuntu, RedHat, etc...


Strange. This is from the official Python docs:

"pip is the preferred installer program. Starting with Python 2.7.9, it is included by default with the Python binary installers."

https://docs.python.org/2.7/installing/


My thought would be that "binary installers" as such are considered distinct from distro-managed packages.


> What are you running, Slackware or something?

CentOS/RHEL?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: