zoukankan      html  css  js  c++  java
  • gyp verb check python checking for Python executable "python2" in the PATH

    第一次安装出现如下错误:

    gyp verb check python checking for Python executable "python2" in the PATH
    gyp verb `which` failed Error: not found: python2
    gyp verb `which` failed     at getNotFoundError (C:Program Files (x86)JenkinsjobsNdbSite-hot-fix-Manual-PreBuildworkspacesrcNdbSite.UI
    ode_moduleswhichwhich.js:13:12)
    gyp verb `which` failed     at F (C:Program Files (x86)JenkinsjobsNdbSite-hot-fix-Manual-PreBuildworkspacesrcNdbSite.UI
    ode_moduleswhichwhich.js:68:19)
    gyp verb `which` failed     at E (C:Program Files (x86)JenkinsjobsNdbSite-hot-fix-Manual-PreBuildworkspacesrcNdbSite.UI
    ode_moduleswhichwhich.js:80:29)
    gyp verb `which` failed     at C:Program Files (x86)JenkinsjobsNdbSite-hot-fix-Manual-PreBuildworkspacesrcNdbSite.UI
    ode_moduleswhichwhich.js:89:16
    gyp verb `which` failed     at C:Program Files (x86)JenkinsjobsNdbSite-hot-fix-Manual-PreBuildworkspacesrcNdbSite.UI
    ode_modulesisexeindex.js:44:5
    gyp verb `which` failed     at C:Program Files (x86)JenkinsjobsNdbSite-hot-fix-Manual-PreBuildworkspacesrcNdbSite.UI
    ode_modulesisexewindows.js:29:5
    gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
    gyp verb `which` failed  python2 { [Error: not found: python2] code: 'ENOENT' }
    gyp verb check python checking for Python executable "python" in the PATH
    gyp verb `which` failed Error: not found: python

    因为我电脑上安装的是Python 3.7,但是这个which命令竟然需要Python 2,于是去StackOver flow找到如下答案。

    • 删除node_modules文件夹
    • 运行 npm install --global windows-build-tools
    • 运行 npm install

    运行npm install --global windows-build-tools命令时又出现一个PowerShell没有管理员权限的错误,于是右键以管理员权限运行PowerShell,命令执行成功,Python2成功安装到C:Users est.windows-build-toolspython27。

    再次运行npm install命令后,又出现之前一样的错误。

    于是再删除node_modules目录,重新运行npm install。居然成功了!

  • 相关阅读:
    Camera2Raw
    ActiveNotifications
    百度检索技巧
    Android开发ScrollView上下左右滑动事件冲突整理一(根据事件)
    四种方案解决ScrollView嵌套ListView问题
    10 条提升 Android 性能的建议
    Android操作外置SD卡和U盘相关文章
    SQLServer通过链接服务器调用Oracle 存储过程
    Easy Image X2 快速分区-恢复镜像-万能驱动 一站式操作!
    纯净PE推荐——优启通 v3.3.2019.0605
  • 原文地址:https://www.cnblogs.com/graphics/p/13221547.html
Copyright © 2011-2022 走看看