Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Cannot install this library from NPM with python 3 #134

Closed
markb-trustifi opened this issue Oct 22, 2018 · 9 comments
Closed

Cannot install this library from NPM with python 3 #134

markb-trustifi opened this issue Oct 22, 2018 · 9 comments

Comments

@markb-trustifi
Copy link

node-webcrypto-ossl: 1.0.38
npm: 6.4.1
node: v8.11.1
python: 3.6.5 :: Anaconda

> node-webcrypto-ossl@1.0.38 install /Users/XXX/YYY/node_modules/node-webcrypto-ossl
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /Users/XXX/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at Socket.emit (events.js:211:7)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:567:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/XXX/YYY/node_modules/node-webcrypto-ossl
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-webcrypto-ossl@1.0.38 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-webcrypto-ossl@1.0.38 install script.
@markb-trustifi markb-trustifi changed the title Cannot install from MPN with python 3 Cannot install from NPM with python 3 Nov 12, 2018
@markb-trustifi markb-trustifi changed the title Cannot install from NPM with python 3 Cannot install this library from NPM with python 3 Nov 12, 2018
@abdulwahidgul24085
Copy link

Any update on this issue?

@microshine
Copy link
Contributor

https://github.com/nodejs/node-gyp

python (v2.7 recommended, v3.x.x is not supported)

Try to install Python v2.7

@markb-trustifi
Copy link
Author

This is well known bug with node-gyp: nodejs/node-gyp#193
There is even petition for it on change.org: https://www.change.org/p/google-inc-upgrade-gyp-to-support-python-3

@markb-trustifi
Copy link
Author

markb-trustifi commented Mar 27, 2019

Try to install Python v2.7

Python 2 is obsolete and is not supported and the gyp project itself is also agonizing.
You should consider moving to GN form node-gyp: nodejs/node#6089

@microshine
Copy link
Contributor

There is one more WebCrypto module which doesn't require C++.

https://github.com/PeculiarVentures/webcrypto

It's based on NodeJS v10 Crypto API

@markb-trustifi
Copy link
Author

@microshine I moved to https://github.com/PeculiarVentures/webcrypto and code works OK, so I can close this issue.

@swartz-k
Copy link

this problem happen when i use CloudFlare by npm init cloudflare-worker demo
for save my time,just mv python its using to another name,and make a link of python2,it works for me.

@markb-trustifi
Copy link
Author

this problem happen when i use CloudFlare by npm init cloudflare-worker demo
for save my time,just mv python its using to another name,and make a link of python2,it works for me.

You can install package with alternative version of python:
npm i --python=/usr/bin/python

@swartz-k
Copy link

this problem happen when i use CloudFlare by npm init cloudflare-worker demo
for save my time,just mv python its using to another name,and make a link of python2,it works for me.

You can install package with alternative version of python:
npm i --python=/usr/bin/python

coool, thx.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants