使用npm install出现check python checking for Python executable “python2“ in the PATH

  • A+
所属分类:技术

chatGPT账号
使用npm install出现check python checking for Python executable "python2" in the PATH时,表示你本地的环境需要使用python2.7的,这个时候可以使用 
npm install --global windows-build-tools 
使用npm install出现check python checking for Python executable “python2“ in the PATH
  • 但是在执行的时候会卡住,
在下面这段代码卡住:
reify:ajv: timing reifyNode:node_modules/windows-build-tools Completed in 17
  • 通过网上查找需要将npm降级,输入npm install @6 -g

使用npm install出现check python checking for Python executable “python2“ in the PATH

  • 重新输入
  • npm install --global windows-build-tools
  • 下载成功

使用npm install出现check python checking for Python executable “python2“ in the PATH

  • !!!记得重新电脑,之后去的项目把node_modules删除,重新下载npm。下面这个是原话,希望能帮助到大家。

使用npm install出现check python checking for Python executable “python2“ in the PATH

  • 如果还是有问题可以试试下面的方法:
  • 先使用 npm config get python 看一下当前的python的设置,可以发现不是2.7的版本。

使用npm install出现check python checking for Python executable “python2“ in the PATH

  • 找到pyenv的python的安装目录:在pyenv下的 /pyenv-win-master\pyenv-win\versions\2.7.15

使用npm install出现check python checking for Python executable “python2“ in the PATH

  • 复制完整目录,最后是以python结尾的。我的是 E:\2.1-software2.0\pyenv\pyenv-win-master\pyenv-win\versions\2.7.15\python。
  • 最后设置一下npm的config为上面的目录

使用npm install出现check python checking for Python executable “python2“ in the PATH

  • 重新执行npm install
至此,完成使用npm install出现check python checking for Python executable “python2“ in the PATH所有操作流程。
免责声明

免责声明:

本文不代表知点网立场,且不构成投资建议,请谨慎对待。用户由此造成的损失由用户自行承担,与知点网没有任何关系;

知点网不对网站所发布内容的准确性,真实性等任何方面做任何形式的承诺和保障;

网站内所有涉及到的区块链(衍生)项目,知点网对项目的真实性,准确性等任何方面均不做任何形式的承诺和保障;

网站内所有涉及到的区块链(衍生)项目,知点网不对其构成任何投资建议,用户由此造成的损失由用户自行承担,与知点网没有任何关系;

知点区块链研究院声明:知点区块链研究院内容由知点网发布,部分来源于互联网和行业分析师投稿收录,内容为知点区块链研究院加盟专职分析师独立观点,不代表知点网立场。

本文是全系列中第137 / 223篇:行业技术

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的电报
  • 这是我的电报扫一扫
  • weinxin
chatGPT账号
知点

发表评论

您必须登录才能发表评论!