Python 3.4 install lxml, pythonlxml
To use Xpath in Python, you must inevitably import the lxml module.
However, one of the main problems facing Python is that it has two mainstream versions: 2.7 and 3.4.
2.7 is a relatively stable version, and many modules have excellent support on 2.7.
3.4 relatively speaking, I think it is more standard and standardized, such as the default exact division and print parentheses.
However, less than 3.4 US dollars is the poor support for some modules, such as scrapy and lxml.
In Python3.4, if pip directly installs lxml, a compiler error is reported. This problem may be improved in later versions. However, one feasible solution is:Download and install the lxml compiled versionTo skip the compilation process.
Download link
Switch to the corresponding directory after downloadingPip install file nameYou can.
In this way, you can use lxml in Python.
PS:
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.