Windows平台下,Scrapy Installation,安裝問題解決

來源:互聯網
上載者:User

標籤:htm   windows平台   top   檔案   openssl   failed   ted   pat   命令   

按理說直接: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檔案再安裝,但總是下錯版本,所以如果上面這個版本你用不了,可以去http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml 這個網站上找對應版本)

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

安裝成功!

 

Windows平台下,Scrapy Installation,安裝問題解決

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.