What is the typical scenario where a package might require Python 2 for npm installation?

Question

Grade: Education Subject: Support
What is the typical scenario where a package might require Python 2 for npm installation?
Asked by:
89 Viewed 89 Answers

Answer (89)

Best Answer
(275)
Packages that involve compiling native add-ons or have complex build scripts written in Python (often older projects) are common culprits. Tools like `node-gyp`, which is used for compiling C/C++ addons for Node.js, historically relied on Python 2 for some of its operations.