安装好Python 2.7 and Python 3.3 or above的前提上。官网:https://scrapy.org/
1、wget https://bootstrap.pypa.io/get-pip.py
2、sudo python2.7 get-pip.py
3、sudo pip install virtualenv
4、pip install scrapy
问题一、
步骤四报错:Python.h No such file or directory
解决:sudo yum install python-devel.x86_64
问题二、
输入scrapy命令报错 (搜索 http://stackoverflow.com/ )
AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'
问题三、
pip list 报如下警告:
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
解决:pip list --format=columns
1、wget https://bootstrap.pypa.io/get-pip.py
2、sudo python2.7 get-pip.py
3、sudo pip install virtualenv
4、pip install scrapy
问题一、
步骤四报错:Python.h No such file or directory
解决:sudo yum install python-devel.x86_64
问题二、
输入scrapy命令报错 (搜索 http://stackoverflow.com/ )
AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'
解决:sudo pip install Twisted==16.4.1
原因:
Twisted dropped support for pyOpenSSL < 16.0.0 in Twisted 16.4.0 release (seehttp://twistedmatrix.com/trac/ticket/8441); in fact it worked for some time, but they recently removed some of the supporting code as well. Is upgrading it an option? You can check pyOpenSSL version by running问题三、
pip list 报如下警告:
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
解决:pip list --format=columns
总结:1、安装软件时,应先参考官方网站。通过百度等搜索的结果比较杂,还得花时间刷选,最后有可能由于软件的配置不同及其它因素,导致安装失败。