by right, Direct: Pip Install Scrapy
Can succeed, but there is an error "Libxml/xpath.h:no such file or directory"
"Error:failed with exit status 2"
(Baidu has a lot of solutions and mostly the same, but did not solve my problem)
Finally, the last officer net to find a solution: https://doc.scrapy.org/en/latest/intro/install.html
Scrapy is written in pure Python and depends on a few key Python packages (among others):
- lxml, an efficient XML and HTML parser
- Parsel, an Html/xml data extraction the library written on top of lxml,
- W3lib, a multi-purpose helper for dealing with URLs and Web page encodings
- Twisted, an asynchronous networking framework
- Cryptography and Pyopenssl, to deal with various network-level security need
Then just press one of the packages above to download (varies from person to person)
If you do not have wheel installed, install it first: Pip Install wheel
I just lxml not, so I just pass: Pip install lxml==3.4.2
Get installation package LXML-3.4.2-CP27-NONE-WIN32.WHL install lxml success!
(In this case, I've been trying to install the. WHL file again, but it's always the wrong version, so if you can't use it, you can go to http://www. ) Lfd.uci.edu/~gohlke/pythonlibs/#lxml find the corresponding version on this website )
In the end, you can happily: Pip install Scrapy
Installation is successful!
Windows platform, scrapy installation, installation problem resolution