-
Notifications
You must be signed in to change notification settings - Fork 45
secp256k1 dependency requires python2 but not explicitly referenced #2
Comments
Thanks for reporting! :) Hmm this is weird, having python3 as the default i can't reproduce the issue:
Anyway, maybe your system behaves differently, after reading a bit about the issue here nodejs/node-gyp#746 looks like it is possible to pass the python version to use in the npm install command, something like |
It looks like it is working for me now; maybe there was some sort of transient issue with a dependency? It falls back to the pure JS implementation just like yours.
I'm fine closing as I cannot reproduce. |
@laboon ok thx, closing then (i missed your response :)) |
DESCRIPTION
The npm install script calls "python" but does not reference an explicit version. However it depends on python2. If python3 is installed and is set as the default
python
, the install will fail. However, there is a simple workaround, setting default python to be python2 (see WORKAROUND).TO REPRODUCE
npm i -g polkadot-deployer
EXPECTED BEHAVIOR
Installs
OBSERVED BEHAVIOR
Error in secp256k1 dependency - see below
WORKAROUND
I simply aliased my python and pip to call explicitly call version 2:
Maybe just add this to the README.md if it doesn't work on someone's machine?
NOTES
Output from my console
(20027) $ npm i -g polkadot-deployer
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
/Users/laboon/.nvm/versions/node/v10.7.0/bin/polkadot-deployer -> /Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/polkadot-deployer/index.js
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/usr/local/opt/python/libexec/bin/python" is v3.7.3, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at PythonFinder.failPythonVersion (/Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack at PythonFinder. (/Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack at ChildProcess.exithandler (child_process.js:282:7)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:380:11)
gyp ERR! stack at Socket.emit (events.js:182:13)
gyp ERR! stack at Pipe._handle.close (net.js:599:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/Users/laboon/.nvm/versions/node/v10.7.0/bin/node" "/Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/polkadot-deployer/node_modules/secp256k1
gyp ERR! node -v v10.7.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] rebuild:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] rebuild 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! /Users/laboon/.npm/_logs/2019-05-15T14_52_52_462Z-debug.log
Secp256k1 bindings compilation fail. Pure JS implementation will be used.
added 181 packages from 207 contributors in 16.598s
The text was updated successfully, but these errors were encountered: