0

I have been trying to install loopback nodejs framework on windows using the command npm install -g loopback-cli. However, i am getting the following error

> gyp ERR! configure error gyp ERR! stack Error: Can't find Python
> executable "python", you can set the PYTHON env variable. gyp ERR!
> stack     at PythonFinder.failNoPython
> (C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node_modules\node-gyp\lib\configure.js:483:19)
> gyp ERR! stack     at PythonFinder.<anonymous>
> (C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node_modules\node-gyp\lib\configure.js:508:16)
> gyp ERR! stack     at
> C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
> gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21) gyp ERR!
> System Windows_NT 10.0.16299 gyp ERR! command "C:\\Program
> Files\\nodejs\\node.exe"
> "C:\\Users\\HP\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\npm-lifecycle\\node_modules\\node-gyp\\bin\\node-gyp.js"
> "rebuild" gyp ERR! cwd
> C:\Users\HP\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa
> gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]
> (node_modules\loopback-cli\node_modules\ursa): npm WARN optional
> SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
5
  • Gyp requires Python, it's telling you that. Do you have Python installed? Commented Mar 31, 2018 at 18:18
  • @SamH. i do not know. What am i supposed to do to install it or check if it is present Commented Mar 31, 2018 at 18:22
  • It you type python into the command line and got enter, does it open a Python REPL or throw an error? Commented Mar 31, 2018 at 18:23
  • @SamH. it throws an error that the term python is not recognized Commented Mar 31, 2018 at 18:30
  • Hopefully it is now clear that this is the problem. This answer has the steps you should follow stackoverflow.com/a/39648550/3518108 Commented Mar 31, 2018 at 18:35

1 Answer 1

2

You need Python 2.7.x for this to work on your machine. Your windows machine is missing essential build tools.

Install windows build tools from npm.

npm install --global --production windows-build-tools

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.