【问题标题】:`python: not found` error when fetching Chromium source with `depot_tools`使用“depot_tools”获取 Chromium 源时出现“python:未找到”错误
【发布时间】:2018-03-17 12:33:03
【问题描述】:

我最近关注Chromium build instructions for Windowsfetch 产生以下错误:

$ fetch chromium
/c/src/depot_tools/fetch: line 8: exec: python: not found

注意:我的 PC 上已经安装了 Python 3.6。

【问题讨论】:

  • 所以你显然没有安装 python 2?有什么问题?
  • Python 3.6 已经安装在我的电脑上,我已经将它添加到路径中,但 depot_tools 显示此错误
  • Python 2 是必需的。
  • 如果您只是在进行 DevTools 开发,请参阅 Run Chrome with your own DevTools frontend 以获得更简单的设置工作流程。
  • 您应该安装 depot_tools,它将立即安装所需的 Python 版本,即 2.x。您还应该将该 python exe 的路径从您的 depot_tools 文件夹添加到 env 变量,然后它将起作用。

标签: google-chrome google-chrome-devtools chromium


【解决方案1】:

Windows 构建指令未能指定所需的 Python 版本,但the Linux ones 很清楚:

系统要求

  • 至少有 8GB RAM 的 64 位 Intel 机器。强烈建议超过 16GB。
  • 至少 100GB 的可用磁盘空间。
  • 您必须已经安装了 Git 和 Python v2

Python 3.x 的可执行文件是python3,Python 2.x 的可执行文件是python,因此您需要安装Python 2.x。

【讨论】:

猜你喜欢
  • 2020-01-18
  • 1970-01-01
  • 2021-09-11
  • 2020-08-15
  • 2021-11-21
  • 1970-01-01
  • 2023-02-06
  • 1970-01-01
相关资源
最近更新 更多