【问题标题】:Why installation of dbt fails? - Failed building wheel for tree-sitter为什么安装dbt失败? - 树木保姆的建造轮子失败
【发布时间】:2021-06-08 12:48:38
【问题描述】:

我正在尝试将 dbt 工具安装到 Window 10。安装了 Python 3.9 和 VS2019。(我不知道为什么需要)

我遇到了奇怪的错误,想知道错误以及应该怎么做:

命令:

git clone https://github.com/fishtown-analytics/dbt.git
cd dbt
pip install -r requirements.txt

错误:

  ERROR: Command errored out with exit status 1:
   command: 'c:\users\my.name\appdata\local\programs\python\python39\python.exe' 
 'c:\users\my.name\appdata\local\programs\python\python39\lib\site- 
packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 
 'C:\Users\MY~1.NAME\AppData\Local\Temp\tmpzybnxyld'
       cwd: C:\Users\my.name\AppData\Local\Temp\pip-install-l8pl5jty\tree- 
 sitter_f257da752ba04b9dacbc947d2d743146
  Complete output (10 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\tree_sitter
  copying tree_sitter\__init__.py -> build\lib.win-amd64-3.9\tree_sitter
  running build_ext
  building 'tree_sitter.binding' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build 
  Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for tree-sitter

【问题讨论】:

    标签: dbt


    【解决方案1】:

    dbt 的当前开发版本(develop 分支,或可安装为v0.20.0rc1)需要两个新的依赖项:

    • tree-sitter==0.19.0
    • tree-sitter-jinja2==0.1.0a1

    其中的第一个,tree-sitter,要求您在系统上安装 C 编译器。查看 GitHub 上的相关问题:https://github.com/fishtown-analytics/dbt/issues/3433

    我们将考虑如何让这种安装体验更加流畅。同时,您可以install GCC,然后再次尝试从源安装dbt。

    【讨论】:

    • 我现在使用默认 Cygwin 配置将 Cygwin 安装到 Windows 10。尝试再次从源安装 dbt,但发生了同样的错误。
    • 什么版本不需要这些依赖?
    • 您可以从 PyPi 或 Homebrew 安装最新的稳定版 dbt (v0.19.1),它不需要这些依赖项。我们还在努力在最终 v0.20.0 版本发布之前删除 C 编译器要求。
    【解决方案2】:

    我当时的建议是坚持上一个版本(稳定的 0.19.0 在发表此评论时)因为在这种情况下安装依赖项会花费大量时间,而且建议不要将 dbt 安装在默认的 python 包中,而是在虚拟环境中安装。

    所以,简而言之

    pip install dbt==0.19.0
    

    【讨论】:

      猜你喜欢
      • 2019-02-22
      • 2017-09-08
      • 2014-12-26
      • 2020-05-12
      • 2017-05-16
      • 1970-01-01
      • 1970-01-01
      • 2020-12-06
      • 2022-07-06
      相关资源
      最近更新 更多