Installation Python and Gyp Error
I have python-3.7.2-amd64 and node-gyp installed (global), when I try to install the module with: npm install node-bluetooth --save
I receive the following errors:
C:\Projects\BluetoothServer\node_modules\node-bluetooth>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Marcelo\AppData\Local\Programs\Python\Python37\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Marcelo\AppData\Roaming\npm-cache_logs\2019-03-08T20_35_51_000Z-debug.log
C:\Projects\BluetoothServer>path PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Acer ProShield;C:\Program Files\Acer ProShield\x86;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Amazon\AWSCLI;C:\Program Files\PuTTY;C:\Program Files\nodejs;C:\Users\Marcelo\AppData\Local\Programs\Python\Python37\Scripts;C:\Users\Marcelo\AppData\Local\Programs\Python\Python37;C:\Users\Marcelo\AppData\Local\Microsoft\WindowsApps;C:\Users\Marcelo\AppData\Roaming\npm
C:\Projects\BluetoothServer> C:\Projects\BluetoothServer>npm i node-bluetooth
[email protected] install C:\Projects\BluetoothServer\node_modules\node-bluetooth node-gyp configure build
C:\Projects\BluetoothServer\node_modules\node-bluetooth>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Marcelo\AppData\Local\Programs\Python\Python37\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Marcelo\AppData\Roaming\npm-cache_logs\2019-03-08T20_41_44_146Z-debug.log
You might need to be using Python 2.7. See the node-gyp package here: https://github.com/nodejs/node-gyp although it refers to Python 2.7 in only the Mac and Unix sections - there might be specific requirements you haven't met in the PC section, or your version of Python won't work.