按照官方文档的说明,安装Scrapy 需要以下程序或者库:
(1)Python 2.7
(2)lxml. Most linux distributions ships PRepackaged versions of lxml. Otherwise refer to http://lxml.de/installation.html
(3)OpenSSL. This comes preinstalled in all Operating systems except Windows (see Platform specific installation notes)
(4)pip or easy_install Python package managers
我们安装的Ubuntu14.04系统都已经自带了前面3个,Python的版本为2.7.6。为了验证是否有安装,我们来查看一下。
打开终端,执行如下命令python, 接下来就是import lxml, import OpenSSL。如下图。
(1)Python 2.7
(2)lxml. Most linux distributions ships PRepackaged versions of lxml. Otherwise refer to http://lxml.de/installation.html
(3)OpenSSL. This comes preinstalled in all Operating systems except Windows (see Platform specific installation notes)
(4)pip or easy_install Python package managers
我们安装的Ubuntu14.04系统都已经自带了前面3个,Python的版本为2.7.6。为了验证是否有安装,我们来查看一下。
打开终端,执行如下命令python, 接下来就是import lxml, import OpenSSL。如下图。
如果import没有报错,说明系统已经自带了。为保险起见,运行
sudo apt-get install python-dev
sudo apt-get install python-dev
再执行:
sudo apt-get install libevent-dev
安装pip
sudo apt-get install python-pip
安装Scrapy, 执行:
sudo apt-get install python-pip
安装Scrapy, 执行:
sudo pip install Scrapy
本文详细介绍了如何在Ubuntu14.04系统中安装Scrapy,包括Python、lxml、OpenSSL等依赖库的检查与安装过程,并提供了安装Scrapy的完整命令。文章还强调了使用pip或easy_install等Python包管理器的重要性,确保开发环境的顺利搭建。
595

被折叠的 条评论
为什么被折叠?



