项目场景: gyp verb check python checking for Python executable “python2” in the PATH

环境

​ node v16.15.0

​ npm 8.5.5

npm install 报错


问题描述

gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (D:\demandindex\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (D:\demandindex\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (D:\demandindex\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at D:\demandindex\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at D:\demandindex\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at D:\demandindex\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (D:\demandindex\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (D:\demandindex\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (D:\demandindex\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at D:\demandindex\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at D:\demandindex\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at D:\demandindex\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21) {npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Program Files\python\python.EXE
npm ERR! gyp verb check python version `C:\Program Files\python\python.EXE -c "import platform; print(platform.python_version());"` returned: "3.8.6\r\n"

最开始以为是缺少python2.7

安装了 python2.7 和 windows-build-tools以后依然报错


原因分析:

node-sass和 node版本不对应

我之前的node-sass版本是4.7.2

NodeJS Supported node-sass version Node Module
Node 17 7.0+ 102
Node 16 6.0+ 93
Node 15 5.0+, <7.0 88
Node 14 4.14+ 83
Node 13 4.13+, <5.0 79
Node 12 4.12+, <8.0 72
Node 11 4.10+, <5.0 67
Node 10 4.9+, <6.0 64
Node 8 4.5.3+, <5.0 57
Node <8 <5.0 <57

解决方案:

node-sass 版本修改6.0.1

在执行 npm install

解决

项目场景: gyp verb check python checking for Python executable python2 in the PATH相关推荐

  1. npm ERR! gyp verb check python checking for Python executable “python2“ in the PATH

    下载了vue2的脚手架工程:https://github.com/PanJiaChen/vue-admin-template npm install的时候出现了异常: node-sass安装报错,缺少 ...

  2. gyp verb check python checking for Python executable “python2“ in the PATH

    gyp verb check python checking for Python executable "python2" in the PATH 缺少python2.7支持 可 ...

  3. npm install 报错 check python checking for Python executable python2 in the PATH

    当npm install 的时候,报如下错误: Building: G:\nodejs\node.exe F:\test\node_modules\node-gyp\bin\node-gyp.js r ...

  4. Node.js:npm install时出错 check python checking for Python executable “python2“ in the PATH

    1.问题描述 Building: G:\nodejs\node.exe F:\Carrie\Luxsens\node_modules\node-gyp\bin\node-gyp.js rebuild ...

  5. npm install 报错 gyp info it worked if it ends with ok npm ERR! gyp verb cli [

    今天新启动一个项目,在 npm install 安装依赖项时出现报错. ERR! code 1 npm ERR! path C:\Users\Administrator\Desktop\14531\m ...

  6. npm ERR gyp verb `which` failed Error: not found: python2

    gyp 报错 not found:python2 在使用vue-cli创建vue3项目时,安装依赖时,报错 npm ERR! gyp verb check python checking for Py ...

  7. npm install 报错 gyp info it worked if it ends with ok npm ERR gyp verb cli [

    今天新启动一个项目,在 npm install 安装依赖项时出现报错. ERR! code 1 npm ERR! path C:UsersAdministratorDesktope31mall-adm ...

  8. npm ERR! gyp verb等一系列错

    npm ERR! code 1 npm ERR! path F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\n ...

  9. gyp verb `which` failed Error: not found: python2解决方案

    yarn install 出现的问题 1.没有yarn npm install -g yarn 2.报错找不到phthon yarn install v1.22.17 warning package- ...

最新文章

  1. 定义交货输出确定过程(Output Determination Procedure)
  2. C/C++面试题:什么是COM和ActiveX,简述DCOM。
  3. 51nod1836-战忽局的手段【期望dp,矩阵乘法】
  4. interp1函数matlab_【原创】干货:用MATLAB搭建电化学单粒子模型(中)
  5. 支持IPsec / L2TP / EtherIP测试版下载
  6. Python collections 模块中的 deque(队列)
  7. 设计模式---组合模式(C++实现)
  8. 《物流与供应链管理》课程论文
  9. 公式中的引号怎么输_Excel计数函数中这些奇怪的参数让我百思不得其解!
  10. Bootstrap辅助类之文本情景类
  11. idea中的maven使用
  12. jmeter请求返回报文中带有转义字符可加/转义处理后做其他操作
  13. 网络编程中,同步传输和异步传输有什么区别
  14. 听说有人谋求稳定的工作?
  15. 20189200余超 2018-2019-2 移动平台应用开发实践第五作业
  16. 计算机组成原理经典复习题集锦(附答案)
  17. 如何在虚拟主机安装ssl证书,详细教程来了
  18. [原创] 在MFC中大家都习惯用CStdioFile来处理文本文件,可是为什么CStdioFile不叫CTextFile?
  19. vlookup使用步骤_vlookup怎么用详细步骤 vlookup函数的使用步骤 vlookup教程
  20. 华清远见重庆中心—JS阶段技术总结/个人总结

热门文章

  1. Jmeter(三) - 从入门到上天 - 常用原件 (详解教程)
  2. 牛根生:我们应该学会“三换思维”
  3. matlab画出玫瑰线,数学实验 玫瑰线的绘制
  4. POJ_1845_Sumdiv_各种数学
  5. 【Benewake(北醒) 】短距 TFmini Plus 12m介绍以及资料整理
  6. Elastic:Elastic Stack 8.0.0-alpha1 发布
  7. UEFI安装win7过程的另类引导系统
  8. 用python写剪刀石头布游戏
  9. Vercel搭建属于自己的ChatGPT平台
  10. 一句Json搞定数组中多层字段的替换