安装lxml失败,我想安装之前的lxml版本

问题遇到的现象和发生背景

安装lxml模块失败,我想安装之前的4.9.1版本,现在最新是4.9.2,可以安装最新的但是不能安装之前的

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> lxml

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

指定版本就可以安装撒
pip install lxml=4.9.1

  1. pip uninstall lxml
  2. pip install lxml==4.9.1