centos7.3 安装scrapy出错Could not find a version that satisfies the requirement Twisted>=13.1.0

1错误原因,通过pip install 安装scrapy是报错Could not find a version that satisfies the requirement Twisted>=13.1.0 (from Scrapy) (from versions: )
No matching distribution found for Twisted>=13.1.0 (from Scrapy)
原因是没有安装Twisted
2.在这里需要安装twisted,可通过wget https://pypi.python.org/packages/source/T/Twisted/Twisted-15.2.1.tar.bz2
获取,然后tar -xjvf Twisted-15.2.1.tar.bz2 进行解压
注意在解压是可能会遇到tar (child): lbzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now的错误,这是因为你没有安装bzip2,通过
yum -y install bzip2 命令安装一下就好了
3.解压之后,cd Twisted-15.2.1到目录下,通过python setup.py install 指令进行安装
4.最后直接进行pip install scrapy进行scrapy安装就行了

你可能感兴趣的:(爬虫,scrapy,centos)