check python checking for Python executable “python2“ in the PATH

背景:

mac电脑升级后重新拉取老项目后安装node_module 和启动项目报错

gyp info using node-gyp@3.8.0
gyp info using node@14.18.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb download using dist-url https://npm.taobao.org/dist
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2

gyp verb check python checking for Python executable "python" in the PATH

gyp verb `which` failed  python Error: not found: python

gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

解决方案1:使用sass 不使用node-sass

npm uninstall node-sass

 npm i -D sass

npm i

参考npm ERR! gyp verb check python checking for Python executable "python2" in the PATH · Issue #20 · themesberg/volt-react-dashboard · GitHub

解决方案2: 根据提示应该是缺少python环境 安装python环境然后设置应该可行

参考:https://www.cnblogs.com/zheng-yuzhu/p/16633889.html

PS:因为我这个项目要的比较急,然后我使用第二种方式太慢了,而且短时间也报错没安装上,所以 我使用的是第一种方式  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值