微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何解决在窗口中从源代码安装 V8 Build 的 depot 工具

如何解决如何解决在窗口中从源代码安装 V8 Build 的 depot 工具

我正在尝试从源代码构建 V8 以尝试一些事情。

最初,我遇到了 depot_tools 的一些问题,这使我找到了这个答案。 How do you compile V8 with Visual Studio?

但是,我收到了这个奇怪的 python 错误

Python path configuration:
  PYTHONHOME = 'D:\Code\v8/depot_tools/python276_bin'
  PYTHONPATH = 'D:\Code\v8/v8/build/gyp'
  program name = 'D:\Code\v8\depot_tools\bootstrap-3_8_0_chromium_8_bin\python3\bin\python3.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'D:\\Code\\v8\\depot_tools\\bootstrap-3_8_0_chromium_8_bin\\python3\\bin\\python3.exe'
  sys.base_prefix = 'D:\\Code\\v8/depot_tools/python276_bin'
  sys.base_exec_prefix = 'D:\\Code\\v8/depot_tools/python276_bin'
  sys.executable = 'D:\\Code\\v8\\depot_tools\\bootstrap-3_8_0_chromium_8_bin\\python3\\bin\\python3.exe'
  sys.prefix = 'D:\\Code\\v8/depot_tools/python276_bin'
  sys.exec_prefix = 'D:\\Code\\v8/depot_tools/python276_bin'
  sys.path = [
    'D:\\Code\\v8/v8/build/gyp','D:\\Code\\v8\\depot_tools\\bootstrap-3_8_0_chromium_8_bin\\python3\\bin\\python38.zip','D:\\Code\\v8/depot_tools/python276_bin\\DLLs','D:\\Code\\v8/depot_tools/python276_bin\\lib','D:\\Code\\v8\\depot_tools\\bootstrap-3_8_0_chromium_8_bin\\python3\\bin',]
Fatal Python error: init_fs_encoding: Failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x000052b0 (most recent call first):
<no Python frame>

我使用的 PYTHONHOME 环境有问题吗?我在 python276_bin 中找不到 depot_tools

我从以下位置下载并复制到 depot_tools https://storage.googleapis.com/chrome-infra/python276_bin.zip

但是还是不行。但错误代码变为

Fatal Python error: init_fs_encoding: Failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
  File "D:\Code\v8\depot_tools\python276_bin\lib\encodings\__init__.py",line 123
    raise CodecRegistryError,\
                            ^
SyntaxError: invalid Syntax

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。