安装dbt-snowflake==1.5.5时snowflake-connector-python编译失败求助
解决
pip install dbt-snowflake==1.5.5编译依赖失败问题 执行pip install dbt-snowflake==1.5.5时出现以下编译错误:
Failed to build snowflake-connector-python
ERROR: Could not build wheels for snowflake-connector-python, which is required to install pyproject.toml-based projects
可行解决方案:降级Python至3.6版本
具体操作步骤:
- 安装Python 3.6.x系列版本(推荐3.6.15,为该分支的最终稳定版)
- 推荐创建并激活独立虚拟环境,避免影响全局Python环境:
# 创建虚拟环境 python3.6 -m venv dbt_venv # Windows系统激活 dbt_venv\Scripts\activate # Linux/macOS系统激活 source dbt_venv/bin/activate - 在激活的虚拟环境中重新执行安装命令:
pip install dbt-snowflake==1.5.5
原因说明
dbt-snowflake==1.5.5依赖的特定版本snowflake-connector-python,在高于3.6的Python版本中编译时会出现底层依赖不兼容问题,导致无法生成wheel包。降级到Python 3.6可匹配该依赖包的编译环境要求,顺利完成安装。
内容的提问来源于stack exchange,提问作者Prashant Raina
相关产品推荐
相关产品推荐

