Hacker News new | ask | show | jobs
by franciscop 2214 days ago
For some of the problems that Node.js and JS at large have with a centralized package manager, I for one am very happy that it's not in the python situation. 100% of the packages I've tried to install in the last 3+ years are simply `npm install PKG`.
2 comments

pip install <package>

works even on iPhone (for pure Python packages in Pythonista for iOS)

Do you mean pip3 install <package>? Also tried that, didn't work. Had to learn about Python versions, pip vs pip3 versions, pipenv, conda, how an old python package doesn't work with a modern Python package, etc.

All I was trying is to combine tensorflow lite with opencv IIRC. Just look at the installation instructions:

- https://www.tensorflow.org/install/pip

- https://www.tensorflow.org/lite/guide/python

- https://docs.opencv.org/3.4/d2/de6/tutorial_py_setup_in_ubun... vs https://stackoverflow.com/a/52880211/938236

The instructions that you've link use `pip install tensorflow`
Yes, but those instructions did not work for me. I am not sure if they didn't work because the required previous libraries were wrong somehow (which would just be `dependencies` in package.json), a different version (non-issue with `dependencies`), my python version was wrong (non-issue with `engines`), etc.
I'd love to see how npm would deal with tensorflow. It's a tough package to compile from scratch.
DONT FORGET sudo pip
Do popular Node packages rely on C and Fortran?
I don’t recall any popular Node package relying on Fortran, but there are two popular packages that rely on C: fsevents and node-sass

It works on macOS and Linux without any issues. Windows usually requires some extra steps to setup node-gyp

Even worse, they sometimes rely on C++