1

この質問は、jsbin をローカルにインストールしようとしたときに発生した問題から作成されました。JGallardoから質問を作成するように依頼されました。元の Q&Aにコメントを投稿したためです(内容を確認するには、リンクをたどってください)。

更新: Windows タグがレビュアーによって削除されたため、Windows 7マシンで問題が発生していることに注意してください。

コマンドnpm install jsbinが機能しません-理解できないエラーがスローされます: "npm ERR! Error: getaddrinfo EAGAIN npm ERR! at errnoException (dns.js:37:11) npm ERR! at Object.onanswer [as oncomplete] (dns.js:124:16)"

私が見つけたように、私の場合に必要なプロキシサーバーをセットアップしました: npm config set proxy=http://servername:port. ディレクトリに呼び出すと、ファイルをフェッチしていますが、 非常に長く実行npm install jsbinされて います。"c:\users\myuser\AppData\Roaming\npm-cache"今、それは言って"can't find python executable"います-これがどの依存関係であるか知っていますか? python パッケージが必要な場合、どうすればインストールできますか?

npn install python上記のエラーが発生した後、実行する前にインストールも試みましたnpn install jsbin。それも機能しませんでした。まだエラーが発生しています "Error: Can't find Python executable "python", you can set the PYTHON env variable."

jsbin をローカルにインストールするのを手伝ってもらえますか? インストールされているように見えるのに、npm が python パッケージを見つけられないのはなぜですか?

注意:公式のソースから公式の Python インタープリターもインストールし、path環境変数を介して利用できることを確認しました。

Your environment has been set up for using Node.js 0.10.12 (x64) and npm.

C:\>python
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

また、PYTHON環境変数をC:\Python33python システムがインストールされたパスに設定しました。

私が得ているエラーは次のとおりです。

gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack     at errnoException (child_process.js:980:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:771:34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Python33\node_modules\jsbin\node_modules\bcrypt
gyp ERR! node -v v0.10.12
gyp ERR! node-gyp -v v0.10.0
gyp ERR! not ok
4

1 に答える 1

0

NPN が python をインストールしていない理由はわかりませんでしたが、別のインストーラーであるchoco (または Chocolatey)で試してみたところ、成功しました。

手順は次のとおりです。

  1. Chocolatey をインストールします。手順については、 Chocolatey の Web サイトを参照してください。
  2. 管理コンソールを開き、次の手順を実行します。

C:\WINDOWS\system32>choco install python

!!ATTENTION!!
The next version of Chocolatey (v0.9.9) will require -y to perform
  behaviors that change state without prompting for confirmation. Start
  using it now in your automated scripts.

  For details on the all new Chocolatey, visit http://bit.ly/new_choco
Chocolatey (v0.9.8.33) is installing 'python' and dependencies. 
By installing you accept the license for 'python' and each dependency you are installing.

python v3.4.3
Using this proxyserver: defrceprx02.ey.net:8443
Downloading python 64 bit
  from 'https://www.python.org/ftp/python/3.4.3/python-3.4.3.amd64.msi'
Using this proxyserver: defrceprx02.ey.net:8443
Installing python...
python has been installed.
python has finished successfully! The chocolatey gods have answered your request!
PATH environment variable does not have C:\tools\python in it. Adding...
Finished installing 'python' and dependencies - if errors not shown in console, none detected. 
Check log for errors if unsure.

C:\WINDOWS\system32>

于 2015-03-30T07:54:59.593 に答える