gpt4 book ai didi

node.js - 是否可以在环境变量中没有 Python 路径的情况下运行 npm install

转载 作者:太空宇宙 更新时间:2023-11-03 23:24:55 25 4
gpt4 key购买 nike

我正在尝试通过 npm 安装 @angular-cli。

我收到以下错误。

gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2

我猜想,路径中不存在 python。但我没有管理员帐户,无法更改环境变量。

有没有办法通过在运行npm install时提及python路径来运行npm install -g @angular/cli

最佳答案

您可以将之前 npm 的“python”配置键设置为适当的值:

$ npm config set python /path/to/executable/python2.7

关于node.js - 是否可以在环境变量中没有 Python 路径的情况下运行 npm install,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45589148/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com