windows上安装参考这个:
http://www.waitalone.cn/python-scrapy-install.html
主要说下我遇到的问题:
安装OpenSSL的时候遇到
from cryptography.hazmat.bindings.openssl.binding import Binding
ImportError: No module named cryptography.hazmat.bindings.openssl.binding
试了以下方法:
easy_install pyOpenSSL==0.13
easy_install cryptography
都不行,直接安装pip再用pip安装pyOpenSSL
pip install pyOpenSSL cryptography
至于PIP的安装,网上方法一大推,自己找吧。
安装完出现以下信息应该算成功了
C:\Users\EMQRRSA>scrapy
:0: UserWarning: You do not have a working installation of the service_identity
module: 'No module named service_identity'. Please install it from <https://pyp
i.python.org/pypi/service_identity> and make sure all of its dependencies are sa
tisfied. Without the service_identity module and a recent enough pyOpenSSL to s
upport it, Twisted can perform only rudimentary TLS client hostname verification
. Many valid certificate/hostname mappings may be rejected.
Scrapy 0.24.5 - no active project
Usage:
scrapy <command> [options] [args]
Available commands:
bench Run quick benchmark test
fetch Fetch a URL using the Scrapy downloader
runspider Run a self-contained spider (without creating a project)
settings Get settings values
shell Interactive scraping console
startproject Create new project
version Print Scrapy version
view Open URL in browser, as seen by Scrapy
[ more ] More commands available when run from project directory
Use "scrapy <command> -h" to see more info about a command
http://doc.scrapy.org/en/latest/intro/tutorial.html
http://scrapy-chs.readthedocs.org/zh_CN/latest/intro/install.html
http://scrapy.org/