"Can't find Python executable" when I tried to install an angular 2 application.

Jason Yu
Jason Yu used Ask the Experts™
on
Dear experts here, I am learning angular 2 these days. When I tied to run "npm install" on an angular 2 application for displaying a slider document, it threw me into an error about python. I have two versions of python installed, how could I set up %PYTHON% PARAMETER?

THANKS.


C:\angular-training-slides\slides\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\jyu\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:UsersjyuAppDataLocalProgramsPythonPython35python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\jyu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\jyu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack     at C:\Users\jyu\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:114:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jyu\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\angular-training-slides\slides\node_modules\bufferutil
gyp ERR! node -v v7.7.4
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok

> utf-8-validate@1.2.2 install C:\angular-training-slides\slides\node_modules\utf-8-validate
> node-gyp rebuild


C:\angular-training-slides\slides\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Users\jyu\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:UsersjyuAppDataLocalProgramsPythonPython35python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\jyu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\jyu\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack     at C:\Users\jyu\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:114:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jyu\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\angular-training-slides\slides\node_modules\utf-8-validate
gyp ERR! node -v v7.7.4
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 (node_modules\bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.2.2 (node_modules\utf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.2.2 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Microsoft ISV Partner
Commented:
Is Phyton in your environment variables? You need to tell windows where to find Phyton (folder name)

Environment variables can be accessed from “Advanced system settings” on the left side of the “System” control panel. How you access and edit the environment variables depends on the version of Windows you are using.

Windows 10 (Also Windows 8.1)

Right-click on the Start Button
Select “System” from the context menu.
Click “Advanced system settings”
Go to the “Advanced” tab
Click “Environment Variables…”
Click variable called “Path” and click “Edit…”
Click “New”
Enter the path to the folder containing the binary you want on your PATH. Separate with ;
Click “OK” to save the changes to your variables and restart your computer for the changes to take effect.

Windows 7 (Also Windows Vista)

Right-click on the My Computer icon on the right side of the Start Menu.
Click “Properties” from the context menu.
Click “Advanced system settings”
Go to the “Advanced” tab
Click “Environment Variables…”
Click variable called “Path” and click “Edit…”
Add the path to the folder containing the binary to the end of the value in your PATH variable.
Separate with ;
Seth SimmonsSr. Systems Administrator

Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Tom (https:#a42283286)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

seth2740
Experts-Exchange Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial