Can't find Python executable “/path/to/executable/python2.7”, you can set the PYTHON env variable

前端 未结 3 1218
忘掉有多难
忘掉有多难 2021-02-19 12:58

bufferutil@1.2.1 install /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/bufferutil > node-gyp rebuild gyp ERR! configure error gyp ERR! stack E

相关标签:
3条回答
  • 2021-02-19 13:35

    Scott Frees' solution didn't work for me but running

    npm config set python $(which python)

    did.

    0 讨论(0)
  • 2021-02-19 13:51

    If you installed Python using a package manager, it should already be on your path- but if not: add it like this:

    export PATH="$PATH:/usr/local/bin/python (or wherever you installed python to)

    Node-gyp requires 2.x and cannot use Python3 (do you have the right version installed?).

    See Running Python on Windows for Node.js dependencies for Windows to make sure you have your environment variable set.

    0 讨论(0)
  • 2021-02-19 13:52

    I solved a similar error by upgrading the node-sass package to a version that is compatible with my installed Node version.

    node-sass publishes a compatibility table that I found on their NPM page.

    0 讨论(0)
提交回复
热议问题