Ubuntu安装Scrapy

首先安装pip: sudo apt-get install python-pip

接着安装scrapy依赖包:
1、 sudo apt-get install python-dev
2、sudo apt-get install libevent-dev
3、 sudo apt-get install libssl-dev

最后执行scrapy安装命令
--sudo pip install scrapy(python2的安装命令)
--sudo pip3 install scrapy(python3的安装命令)

安装完后,可以输入scrapy version查看是否安装成功
如果出现了以下的错误信息,需要执行这条命令:
--sudo pip3 install service_identity --force --upgrade

:0: UserWarning: You do not have a working installation of the service_identity module: 'cannot import name 'opentype''. Please install it from and make sure all of its dependencies are satisfied. Without the service_identity module, Twisted can perform only rudimentary TLS client hostname verification. Many valid certificate/hostname mappings may be rejected.
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容