【问题标题】:Is it possible to run npm install without Python path present in Environmental variable是否可以在环境变量中不存在 Python 路径的情况下运行 npm install
【发布时间】:2017-08-09 11:16:17
【问题描述】:

我正在尝试通过 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 -g @angular/cli 在运行 npm install 时提及 python 路径。

【问题讨论】:

    标签: node.js windows cmd npm npm-install


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2019-08-06
      • 1970-01-01
      • 2016-01-03
      • 1970-01-01
      • 2012-10-23
      • 2021-12-02
      • 1970-01-01
      • 2021-01-22
      • 1970-01-01
      相关资源
      最近更新 更多