目 录CONTENT

文章目录

【Python】pip 安装lxml编译失败处理

EulerBlind
2025-07-01 / 0 评论 / 0 点赞 / 0 阅读 / 0 字

安装环境

Ubuntu 20.04

错误信息

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

处理方案

  1. 先安装依赖包

    sudo apt-get install libxml2 libxslt-dev
    

  2. 重新安装lxml

    pip install lxml==4.2.5
    

0

评论区