Collecting lxml==4.5.1 (from -r requirements.txt (line 36)) Using cached lxml-4.5.1.tar.gz (4.5 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [3 lines of output] Building lxml version 4.5.1. Building without Cython. Error: Please make sure the libxml2 and libxslt development packages are installed. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
时间: 2024-02-14 16:24:46 浏览: 138
PyPI 官网下载 | opencv-python-4.5.3.56.tar.gz
5星 · 资源好评率100%
根据错误信息显示,安装lxml时遇到了问题。错误提示需要安装libxml2和libxslt的开发包。您可以尝试使用以下命令来安装这些依赖包:
```
sudo apt-get install libxml2-dev libxslt-dev
```
安装完成后,再次运行安装lxml的命令:
```
pip install lxml==4.5.1
```
这样应该可以解决问题。如果还有其他问题,请随时告诉我。
阅读全文