一、报错描述
docker 中 使用 pip install lxml, 报错:error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
报错图如下:
二、解决方案
在构建Docker中,使用 apt-get install python3-lxml 代替 pip install lxml,可以正常安装(解决安装依赖报错问题)
apt-get install python3-lxml
验证操作如下:
参考文章:https://lxml.de/installation.html
-------------- END ---------------