欢迎访问 生活随笔!

凯发k8官方网

当前位置: 凯发k8官方网 > 运维知识 > linux >内容正文

linux

python (16) 如何在linux下安装lxml(pip安装,ubuntu下,centos下) -凯发k8官方网

发布时间:2025/1/21 linux 22 豆豆
凯发k8官方网 收集整理的这篇文章主要介绍了 python (16) 如何在linux下安装lxml(pip安装,ubuntu下,centos下) 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

首先需要明白lxml包依赖其他包,必须先安装其他包然后再安装lxml

安装python-pip:方便安装python的第三方包

[root@******/]# wget https://bootstrap.pypa.io/get-pip.py --no-check-cert                                                      

[root@******/]# python get-pip.py

ubuntu 下安装lxml:

安装依赖包   :[root@******/]# apt-get install libxml2-dev libxslt-dev python-dev

然后安装lxml:[root@******/]# apt-get install python-lxml

centos 下安装lxml:

安装依赖包   :[root@****** /]# yum install libxslt-devel python-devel
然后安装lxml:[root@****** /]# pip install lxml

总结

以上是凯发k8官方网为你收集整理的python (16) 如何在linux下安装lxml(pip安装,ubuntu下,centos下)的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得凯发k8官方网网站内容还不错,欢迎将凯发k8官方网推荐给好友。

  • 上一篇:
  • 下一篇:
网站地图