You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows系统Python3.12安装snowflake-connector-python报错求助

问题

在Windows系统上执行以下命令安装Snowflake Python连接器:

pip install snowflake-connector-python

当前Python版本为3.12.0,安装时出现链接错误:

LINK : fatal error LNK1104: cannot open file 'build\temp.win-amd64-cpython-312\Release\src\snowflake\connector\nanoarrow_cpp\ArrowIterator\nanoarrow_arrow_iterator.cp312-win_amd64.exp'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\link.exe' failed with exit code 1104
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for snowflake-connector-python
Failed to build snowflake-connector-python
ERROR: Could not build wheels for snowflake-connector-python, which is required to install pyproject.toml-based projects

解决方案
  • 安装预编译wheel包:Python 3.12的snowflake-connector-python本地编译适配存在问题,直接安装兼容的预编译版本,执行:

    pip install snowflake-connector-python==3.5.0
    

    注:3.5.0及以上版本已支持Python 3.12的预编译wheel,可根据需求选择最新兼容版本。

  • 修复Visual Studio Build Tools配置:若坚持本地编译,确保Visual Studio Build Tools已安装C++桌面开发组件,然后通过对应编译环境执行安装:

    1. 打开x64 Native Tools Command Prompt for VS 2022
    2. 切换到你的Python虚拟环境(如有使用)
    3. 重新执行pip install snowflake-connector-python
  • 清理pip缓存:缓存损坏可能导致编译失败,清理后重新安装:

    pip cache purge
    pip install snowflake-connector-python
    
  • 通过conda安装:conda包管理会自动处理编译依赖,执行:

    conda install -c conda-forge snowflake-connector-python
    

内容的提问来源于stack exchange,提问作者Vinay Chimmili

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 23:47:07