I am starting up with node This is from node.js README.md
Prerequisites (Unix only):
* GCC 4.2 or newer * Python 2.6 or 2.7 * GNU Make 3.81 or newer * libexecinfo (FreeBSD and OpenBSD only)
Curious to know why does node.js need Python ? Does it use Python underneath its API
Comparing NodeJS vs Python, Node. js is an open-source JS framework used to build both client and server-side network apps, while Python is an object-oriented, high-level programming language. NodeJS has a reputation for creating scalable and high-performance apps with its rich tech stack and robust ecosystem.
NPM has a package called windows-build-tools that should automatically install everything you need to get node-gyp working, including the Microsoft build tools, compilers, Python, and everything else required to build native Node modules on Windows.
No, because Node. js works with JavaScript, and Python has CPython.
node-gyp requires that you have installed a compatible version of Python, one of: v3. 7, v3. 8, v3. 9, or v3.
Node.js is built with GYP — cross-platform built tool written in Python. Also some other build steps are implemented in Python. So Python is required for building node from source.
But you also need Python for building native addons.
Yes, node uses some python scripts under the hood, though Node is largely written in C++.
See some of Node's python code here:
https://github.com/joyent/node/tree/master/tools
E.g., js2c.py converts Javascript into C-style char arrays:
https://github.com/joyent/node/blob/master/tools/js2c.py
In general, if a package tells you that it requires Python, then it is almost certainly using Python ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With