npm安装某些包在windows下遇到的错误
2017-03-17 19:58
253 查看
gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (E:\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:19) gyp ERR! stack at PythonFinder.<anonymous> (E:\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:480:16) gyp ERR! stack at E:\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:114:15) gyp ERR! System Windows_NT 10.0.15048 gyp ERR! command "E:\\nodejs\\node.exe" "E:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd G:\gulp-angular\node_modules\bufferutil gyp ERR! node -v v7.7.1 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not ok > utf-8-validate@1.2.2 install G:\gulp-angular\node_modules\utf-8-validate > node-gyp rebuild G:\gulp-angular\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "E:\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (E:\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:19) gyp ERR! stack at PythonFinder.<anonymous> (E:\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:480:16) gyp ERR! stack at E:\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:114:15) gyp ERR! System Windows_NT 10.0.15048 gyp ERR! command "E:\\nodejs\\node.exe" "E:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd G:\gulp-angular\node_modules\utf-8-validate gyp ERR! node -v v7.7.1 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not ok
这个错误是Windows编译的问题,要解决
一是换Linux,不得不说Linux环境比windows好太多
当然很多人怕麻烦那就只有安装编译环境了,错误说缺少python环境就先装python。装完后,我估计会提醒没有c++的组件继续报错,然后在安装vs就可以了
解决方法:
安装Python2.7 , 安装vs2015社区版
还有向大家提个醒,最好不要在Windows环境下使用sass,需要Ruby环境,很麻烦,我曾经在这个问题上反复打转,最终还是放弃写sass。
相关文章推荐
- Virtualbox安装Windows 8.1遇到0x000000C4错误解决办法 - 转
- 计算机意外地重新启动或遇到错误。Windows 安装无法继续。若要安装Windows,请单击“确定”重新启动计算机,然后重新启动安装”。
- [置顶] npm安装webpack步骤及遇到的错误
- 安装Windows Identity Foundation 报错:安装程序遇到错误: 0x80070422解决办法
- Windows ->> Windows下安装MSI程序遇到2503和2502错误
- windows:cmd运行Python,安装pip,修改了某些博客里面的错误命令
- 计算机意外地重新启动或遇到错误。windows安装无法继续。若要安装windows 请单击 确定 重新启动计算机
- 安装Windows更新程序遇到错误:0x80070422
- windows 下 再次安装mysql 时遇到1067错误
- 装带sp1的英文版Sharepoint,安装必备组件时候遇到The tool was unable to install Hotfix for Microsoft Windows (KB976462)错误
- Windows 8安装软件时遇到运行时错误‘339’ MSCOMCTL.ocx或其附件之一未注册
- windows安装mysql 遇到错误193的解决办法
- "计算机意外地重新启动或遇到错误。windows安装无法继续"怎么办
- 在 Windows 7 中安装 .NET Framework 时遇到错误:无法建立到信任根颁发机构的证书链
- Windows 7下用 pip 安装 markupsafe 时遇到的错误
- 计算机意外地重新启动或遇到错误。windows安装无法继续。若要安装windows 请单击 确定 重新启动计算机
- 《重装系统时重启界面弹出对话框(计算机意外地重新启动或遇到错误,Windows安装无法继续……)》
- WINDOWS安装python3.X遇到的错误解决方法
- Windows已找到设备的驱动程序软件,但在试图安装它时遇到错误怎么解决
- windows 环境安装 MySQL-python 遇到错误 serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['regi