Python 3.4 Install lxml

Source: Internet
Author: User

Using XPath in Python inevitably requires pouring into the lxml module.
But one of the main problems python faces now is that he has two mainstream versions 2.7 and 3.4

2.7 is a relatively stable version, and many modules are very well supported on 2.7.
3.4 Relatively speaking, I think more standard and normalization, such as the default precision division, as well as print brackets and so on.
But the 3.4 drawback is the support of some modules is not very good, such as: Scrapy,lxml.

I use the Python3.4 in the PIP directly installed lxml will report a compiler error, this problem may be improved in subsequent releases, but a feasible solution is to download the installation lxml compiled version , thus skipping the compilation process.

Download link
After downloading, switch to the appropriate directory to use pip install 文件名
This makes it possible to use lxml in Python.

Ps:
  1. A small flaw, that is no lxml source, if you use Pycharm and other Ides, then there will be a lack of code hints.
  2. Although the problem of lxml when installing Scrapy was resolved, the scrapy itself was designed to be used only at 2.7 in the current version (1.0.1).

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Python 3.4 Install lxml

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.