How to use a different version of python during NPM install?
set python to python2.7 before running npm install
Linux:
export PYTHON=python2.7
Windows:
set PYTHON=python2.7
You can use --python
option to npm like so:
npm install --python=python2.7
or set it to be used always:
npm config set python python2.7
Npm will in turn pass this option to node-gyp when needed.
(note: I'm the one who opened an issue on Github to have this included in the docs, as there were so many questions about it ;-) )