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

NPM Installation error with incompatible python vresions #74

Open
edison0xyz opened this issue Feb 17, 2019 · 2 comments
Open

NPM Installation error with incompatible python vresions #74

edison0xyz opened this issue Feb 17, 2019 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@edison0xyz
Copy link
Contributor

Installation error reported:

> [email protected] preinstall /Users/<user>/Desktop/testing_folder/kaya/node_modules/scrypt
> node node-scrypt-preinstall.js
> [email protected] install /Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents
> node install
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/<user>/.pyenv/shims/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:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:395:11)
gyp ERR! stack     at Socket.emit (events.js:188:13)
gyp ERR! stack     at Pipe._handle.close (net.js:610:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/Cellar/node/11.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/11.6.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/11.6.0/bin/node" "/Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents
node-pre-gyp ERR! node -v v11.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/11.6.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/<user>/Desktop/testing_folder/kaya/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
> [email protected] install /Users/<user>/Desktop/testing_folder/kaya/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/<user>/.pyenv/shims/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:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:395:11)
gyp ERR! stack     at Socket.emit (events.js:188:13)
gyp ERR! stack     at Pipe._handle.close (net.js:610:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/Cellar/node/11.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/<user>/Desktop/testing_folder/kaya/node_modules/scrypt
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
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!     /Users/<user>/.npm/_logs/2019-02-16T21_03_31_296Z-debug.log

Unable to replicate on my machine. Will appreciate if anyone can find a workaround if you face the same issue.

@edison0xyz edison0xyz added help wanted Extra attention is needed good first issue Good for newcomers labels Feb 17, 2019
@edison0xyz edison0xyz changed the title Installation error NPM Installation error with incompatible python vresions Feb 17, 2019
@ahoward1024
Copy link

If you haven't figured this out already the culprit is here:
Error: Command failed: /Users/<user>/.pyenv/shims/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];

Unfortunately it looks like the node-gyp module isn't playing nicely with pyenv on MacOS.
The only way I was able to solve this was by removing pyenv. Using the system python or switching versions to either 3.7.2 or 2.7.1 did not seem to work

@edison0xyz
Copy link
Contributor Author

edison0xyz commented Mar 25, 2019

Thanks for pointing the potential fix.
Did you try https://github.com/nodejs/node-gyp#configuring-python-dependency ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants