web-dev-qa-db-ja.com

Python実行可能ファイル "/path/to/executable/python2.7"が見つかりません。PYTHON env変数を設定できます

[email protected] install /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/bufferutil> node-gyp rebuild gyp ERR!configure error gyp ERR!stack Error:Ca n't find Python実行可能ファイル "/path/to/executable/python2.7"、PYTHON環境変数を設定できます。 gyp ERR! failNoPythonでスタック(/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:401:14)gyp ERR! /usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:330:11でスタックgyp ERR! Fのスタック(/usr/lib/node_modules/npm/node_modules/which/which.js:78:16)gyp ERR! Eのスタック(/usr/lib/node_modules/npm/node_modules/which/which.js:82:29)gyp ERR! /usr/lib/node_modules/npm/node_modules/which/which.js:93:16にスタックgyp ERR! FSReqWrap.oncompleteでスタック(fs.js:82:15)gyp ERR!システムLinux 3.13.0-74-generic gyp ERR!コマンド "/ usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/bufferutil gyp ERR! node -v v5.3.0 gyp ERR! node-gyp -v v3.2.1 gyp ERR!正常ではありませんnpm WARN install:[email protected] [email protected] install:node-gyp rebuild npm WARN install:[email protected] Exit status 1> [email protected] install/home/sudthenerd /polymer-starter-kit-1.2.1/node_modules/utf-8-validate> node-gyp rebuild gyp ERR!エラーgyp ERRを構成します!スタックエラー:Python実行可能ファイル "/path/to/executable/python2.7"が見つかりません。PYTHON環境変数を設定できます。 gyp ERR! failNoPythonでスタック(/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:401:14)gyp ERR! /usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:330:11でスタックgyp ERR! Fのスタック(/usr/lib/node_modules/npm/node_modules/which/which.js:78:16)gyp ERR! Eのスタック(/usr/lib/node_modules/npm/node_modules/which/which.js:82:29)gyp ERR! /usr/lib/node_modules/npm/node_modules/which/which.js:93:16にスタックgyp ERR! FSReqWrap.oncompleteでスタック(fs.js:82:15)gyp ERR!システムLinux 3.13.0-74-generic gyp ERR!コマンド "/ usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/utf-8-validate gyp ERR! node -v v5.3.0 gyp ERR! node-gyp -v v3.2.1 gyp ERR!正常ではありませんnpm WARN install:[email protected] [email protected] install:node-gyp rebuild npm WARN install:[email protected]終了ステータス1

12

Scott Freesのソリューションは私にはうまくいきませんでした

npm config set python $(which python)

した。

24
Kodie Grantham

Pythonをパッケージマネージャーを使用してインストールした場合は、すでにパス上にあるはずですが、そうでない場合は、次のように追加します。

export PATH = "$ PATH:/ usr/local/bin/python(またはインストールした場所python to))

Node-gypは2.xを必要とし、Python3を使用できません(正しいバージョンがインストールされていますか?)。

Windowsで Running Python を参照して、環境変数が設定されていることを確認してください。

5
Scott Frees