Windows platform, scrapy installation, installation problem resolution

Source: Internet
Author: User

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

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.