安装lxml,抓取、解析网页
生活随笔
收集整理的這篇文章主要介紹了
安装lxml,抓取、解析网页
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
準(zhǔn)備工作:
?
1.確認(rèn)python-dev,cython(可不安裝),easy_install都已安裝好(安裝方法見:http://blog.csdn.net/qazplm12_3/archive/2010/08/17/5818471.aspx )。
?
2.安裝
-
libxml 2.6.21 or later. It can be found here: http://xmlsoft.org/downloads.html
If you want to use XPath, do not use libxml2 2.6.27. We recommend libxml2 2.7.3, 2.7.7 or later.
-
libxslt 1.1.15 or later. It can be found here: http://xmlsoft.org/XSLT/downloads.html
?3.安裝lxml
?
操作如下:
?
#!/bin/bash
?
?
sudo apt-get install libxml2-dev
sudo apt-get install libxslt1-dev
?
easy_install lxml
?
?
參考:http://codespeak.net/lxml/installation.html
總結(jié)
以上是生活随笔為你收集整理的安装lxml,抓取、解析网页的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: latex word相互转换
- 下一篇: 如何使用 Cisdem Video Co