check-python-checking-for-Python-executable-python2-in-the-PATH
check python checking for Python executable “python2“ in the PATH
背景:
mac电脑升级后重新拉取老项目后安装node_module 和启动项目报错
gyp info using
gyp info using | 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
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
参考
解决方案2: 根据提示应该是缺少python环境 安装python环境然后设置应该可行
参考:
PS: 因为我这个项目要的比较急,然后我使用第二种方式太慢了,而且短时间也报错没安装上,所以 我使用的是 第一种方式