Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install library from npm #653

Open
derodriguez-dev opened this issue Jul 17, 2021 · 5 comments · May be fixed by #658
Open

Unable to install library from npm #653

derodriguez-dev opened this issue Jul 17, 2021 · 5 comments · May be fixed by #658

Comments

@derodriguez-dev
Copy link

Hi,
I got an error during the installation from npm (npm install --save appmetrics).

System information

  • Linux ~ Ubuntu 20.04
  • GNU Make 4.2.1
  • GCC 9.3.0
  • Python 3.8.10 (I've more than one version of python, but I pointed the 3* version on my npm config).
  • Node v14.17.2
  • NPM 6.14.13

Error stack trace

gyp: [Errno 2] No such file or directory: 'python' while executing command '['python', './generate_build_id.py']' in binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:375:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.8.0-59-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /myProjectNodeModulesPath/appmetrics
gyp ERR! node -v v14.17.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
@maos1111
Copy link

Hi, has found a solution?

@derodriguez-dev
Copy link
Author

No, I haven't found a solution. I'm still waiting for an answer!

koterpillar added a commit to koterpillar/appmetrics that referenced this issue Mar 23, 2022
Python 3 is already used by gyp, and `python` binary is removed from
e.g. macOS 13.2.

Fixes RuntimeTools#653
@koterpillar koterpillar linked a pull request Mar 23, 2022 that will close this issue
@akhil-karat
Copy link

Same issue with Mac

gyp: [Errno 2] No such file or directory: 'python' while executing command '['python', './generate_build_id.py']' in binding.gyp while trying to load binding.gyp

OS: Monterey 12.3
Node: 14
npm: 6.14.15
node-gyp and xcode libs installed

@Michael-Reich
Copy link

Same here, any clou why this happens?

@nutboltu
Copy link

I had the same issue. For mac OS: Monterey 12.3, you need to install python 2 manually. I tried to install it using pyenv but didn't work. The workaround is to install it from the official download site:

https://www.python.org/downloads/release/python-2718/macOS 64-bit installer

It works for me.

System Information

  • OS: Monterey 12.3
  • Node: 14
  • npm: 6.14.15

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

Successfully merging a pull request may close this issue.

5 participants