Fix Python – npm – “Can’t find Python executable “python”, you can set the PYTHON env variable.”

Question

Asked By – Nick

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:

enter image description here

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:

enter image description here

Any ideas please?

Now we will see solution for issue: npm – “Can’t find Python executable “python”, you can set the PYTHON env variable.”


Answer

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.

This question is answered By – jvecsei

This answer is collected from stackoverflow and reviewed by FixPython community admins, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0