Search code examples
javascriptpython-2.7ethereumweb3js

Installing npm install --save-dev web3@1.0.0-beta.26 error?


I am trying to install web3.js library and getting the below issue.

  • Node.js 8.x
  • Windows 7.

I am able to find python installation under this folder.

C:\Users\Mabel.windows-build-tools\python27

C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin \....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )

gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python\path\to\executable", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_mo dules\npm\node_modules\node-gyp\lib\configure.js:483:19)


cmd showing the error on Windows


Solution

  • npm config set python C:\Python27\python.exe

    The above command solved the issue.