Ubuntu 14.04安装Scrapy
程序员文章站
2022-03-02 23:24:23
...
参考:https://docs.scrapy.org/en/latest/intro/install.html
以下命令都在root用户下执行
1、更新apt-get软件源仓库:
echo -e "deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse\n"\
"deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse\n"\
"deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse\n"\
"deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse\n"\
"deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse\n"\
"deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse\n"\
"deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse\n"\
"deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse\n"\
"deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse\n"\
"deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse" > /etc/apt/sources.list
2、更新软件包列表:
apt-get update
3、安装Scrapy依赖的软件包:
apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev
4、为pip更新软件源仓库,否则会发生网络问题。
mkdir /root/.pip/
echo -e "[global]\n"\
"index-url = http://pypi.douban.com/simple\n"\
"[install]\n"\
"trusted-host = pypi.douban.com"
5、升级setuptools至最新版本,否则安装scrapy时会报错:
pip install --upgrade setuptools
6、安装Scrapy依赖的其它python包,不知道为什么Scrapy本身没有管理这些包:
pip install configparser
pip install enum
pip install enum34
7、安装Scrapy
pip install scrapy
上一篇: 2021最常用的8个代码编辑器推荐
下一篇: 爬取51和智联的招聘信息
推荐阅读
-
在Ubuntu 14.04上部署 PHP 环境及 WordPress
-
深度学习环境搭建(ubuntu16.04+Titan Xp安装显卡驱动+Cuda9.0+cudnn+其他软件)
-
ubuntu14.04安装opencv3.0.0的操作方法
-
ubuntu16.10安装docker17.03.0-ce并配置国内源和加速器
-
在Ubuntu系统上安装Nginx服务器的简单方法
-
Ubuntu 搭建LNMP环境图文教程 安装所需依赖库
-
只要四个步骤轻松完成win7 ubuntu双系统安装(硬盘安装,无需光驱)
-
Ubuntu操作系统安装图文教程
-
ubuntu14.04+docker的安装及使用
-
Ubuntu系统安装