1. 程式人生 > >centos7.3 安裝scrapy出錯Could not find a version that satisfies the requirement Twisted>=13.1.0

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安裝就行了