npm - “Can't find Python executable ”python“, you can set the PYTHON env variable.”

后端 未结 8 1800
夕颜
夕颜 2021-02-02 07:04

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

8条回答
  •  梦如初夏
    2021-02-02 07:31

    One of the following solutions will work for you:

    1. npm config set python c:\Python\27\python.exe or set PYTHON=D:\Python\bin\Python.exe
    2. npm config set python D:\Library\Python\Python27\python.exe
    3. Let npm configure everything for you (takes forever to complete) 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

提交回复
热议问题