zoukankan      html  css  js  c++  java
  • Windows平台下,Scrapy Installation,安装问题解决

    按理说直接:pip install scrapy

    就可以成功,但是出现了错误“libxml/xpath.h: No such file or directory”

    “error:failed with exit status 2”

    (百度上有很多解决方案而且大多相同,但是都没解决我的问题)

    最后还是上官网找解决方法: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 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

    然后就按着上面的一个一个包下载(因人而异)

    如果没有安装Wheel 要先安装:pip install wheel

    我只是lxml没有,所以我就只通过:pip install lxml==3.4.2

    得到安装包lxml-3.4.2-cp27-none-win32.whl 安装lxml成功!

    (这里再说一下我之前因为用命令总安装不成功,就想着直接下.whl文件再安装,但总是下错版本,所以如果上面这个版本你用不了,可以去

    最后就可以愉快地:pip install scrapy

    安装成功!

  • 相关阅读:
    如何获取下拉框中的值
    如何建立主从服务器
    hibernate
    Python基础(一)
    python2 与 python3 区别
    canvas简述(二)游戏实战思路
    canvas简述(一)
    C简述(二)
    C语言的基本简述
    Js基础(三) WebAPI
  • 原文地址:https://www.cnblogs.com/junglefish/p/6266674.html
Copyright © 2011-2022 走看看