当前位置: 首页> 汽车> 新车 > check python checking for Python executable “python2“ in the PATH

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

时间:2025/8/26 21:06:19来源:https://blog.csdn.net/wangshang1320/article/details/139831180 浏览次数: 1次

背景:

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

关键字:check python checking for Python executable “python2“ in the PATH

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: