Skip to content
PYGWALKER
常见问题
安装错误

常见问题:安装错误

错误:构建 quickjs 轮子失败 - Microsoft Visual Studio 错误

常见错误信息

在安装 PyGWalker 时,用户可能会遇到以下一个或多个错误:

  • ERROR: Failed building wheel for quickjs
  • error: Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\bin\HostX86\x64\cl.exe' failed with exit code 2
  • error D8024 : incompatible-pointer-types
  • [end of output] note: This error originates from a subprocess, and is likely not a problem with pip
  • ERROR: Could not build wheels for quickjs, which is required to install pyproject.toml-based projects
  • Building wheel for quickjs (setup.py) ... error
  • error: Microsoft C++ 14.0 or greater is required

受影响的环境

  • 操作系统:Windows 10/11
  • Python 版本:Python 3.7、Python 3.8、Python 3.9
  • 安装方式pip install pygwalker
  • 常见于:全新 Python 安装、缺少 C++ 构建工具的虚拟环境

快速解决方案

方案一:安装预构建的轮子(推荐,无需编译)

pip install --only-binary :all: pygwalker

方案二:升级 Python(最有效)

# 升级到 Python 3.9 或更高版本(推荐 3.10、3.11、3.12)
# 从 python.org 下载后执行:
pip install --upgrade pip
pip install pygwalker

方案三:安装 Microsoft C++ Build Tools(适用于 Windows 用户)

  1. 下载 Microsoft C++ Build Tools (opens in a new tab)
  2. 运行安装程序并选择 “使用 C++ 的桌面开发”
  3. 重启命令行/终端
  4. 再次尝试安装:
pip install pygwalker

其他解决方案

使用 Anaconda/Miniconda(自动处理 C 依赖)

conda install -c conda-forge pygwalker

WSL/Linux 用户

# Ubuntu/Debian
sudo apt-get update
sudo apt-get install python3-dev build-essential
pip install pygwalker
 
# CentOS/RHEL/Fedora
sudo yum install python3-devel gcc gcc-c++
pip install pygwalker

安装指定版本(包含预构建轮子)

# 查看带有预构建轮子的可用版本
pip install pygwalker==0.3.9  # 或最新稳定版

Docker 解决方案(隔离环境)

FROM python:3.11-slim
RUN pip install pygwalker

为什么会出现此错误

出现该错误的原因:

  1. quickjs 是需要 C/C++ 编译的依赖
  2. Windows 默认不包含 C++ 编译器
  3. Python 3.7 与较新的 C++ 构建工具存在兼容性问题
  4. 安装程序尝试从源代码构建而非使用预构建轮子

安装后验证

# 测试 PyGWalker 是否安装成功
import pygwalker as pyg
print(pyg.__version__)

仍有问题?

若以上方案均无效:

  1. 检查 Python 版本

    python --version

    确认 Python 版本为 3.8 或更高

  2. 清理 pip 缓存

    pip cache purge
    pip install --no-cache-dir pygwalker
  3. 在全新的虚拟环境中安装

    python -m venv fresh_env
    fresh_env\Scripts\activate  # Windows
    # source fresh_env/bin/activate  # Linux/Mac
    pip install --upgrade pip setuptools wheel
    pip install pygwalker
  4. 报告问题

搜索关键词

  • pygwalker 安装错误 windows
  • failed building wheel for quickjs pygwalker
  • pygwalker microsoft visual studio error
  • pygwalker cl.exe failed with exit code 2
  • pygwalker incompatible-pointer-types error
  • pip install pygwalker error quickjs
  • pygwalker setup.py error
  • pygwalker C++ 14.0 required error
  • cannot install pygwalker windows
  • pygwalker build wheels failed