I'm trying to run the following command: npm install -g bower gulp cordova ionic tsd@next karma-cli protractor node-gyp coffee-script js-beautify typescript npm-check
I have installed Python, Visual Studio Express and node-gyp so thought I'd be good to go, however I get the following errors:
Regarding the "Can't find Python executable "python", you can set the PYTHON env variable."
error, I'm a little confused because I have set the PYTHON environmental variable like so:
Any ideas please?
This question is related to
python
node.js
npm
npm-install
You got to add python to your PATH variable. One thing you can do is Edit your Path variable now and add
;%PYTHON%;
Your variable PYTHON should point to the root directory of your python installation.
One of the following solutions will work for you:
c:\Python\27\python.exe
or set PYTHON=D:\Python\bin\Python.exe
npm config set python D:\Library\Python\Python27\python.exe
npm --add-python-to-path='true' --debug install --global windows-build-tools
(Must be executed via "Run As Administrator" PowerShell)If not... Try to install the required package on your own (I did so, and it was node-sass
, after installing it manually, the whole npm install
was successfully completed
The easiest way is to let NPM do everything for you,
npm --add-python-to-path='true' --debug install --global windows-build-tools
I installed python2.7 to solve this issue. I wish can help you.
https://github.com/nodejs/node-gyp#on-windows
try
npm config set python D:\Library\Python\Python27\python.exe
Just run below command with admin access
npm install --global --production windows-build-tools
Try:
Install all the required tools and configurations using Microsoft's windows-build-tools by running npm install -g windows-build-tools
from an elevated PowerShell (run as Administrator).
You are running the Command Prompt as an admin. You have only defined PYTHON for your user. You need to define it in the bottom "System variables" section.
Also, you should only point the variable to the folder, not directly to the executable.
Source: Stackoverflow.com