ubuntu14.04下安装爬虫工具scrapy
scrapy是目前准备要学习的爬虫框架,其在ubuntu14.04下的安装过程如下:
ubuntu14.04下默认安装了2.7的python以及setuptools,若未安装,可通过下面指令安装:
sudo apt-get install python
sudo apt-get install python-setuptools
然后安装Twisted:
sudo apt-get install python-twisted
然后是Scrapy:
sudo apt-get install python-scrapy
安装完成后,如果直接键入scrapy启动的话会报类似如下错误:
File "/usr/local/bin/scrapy", line , in <module>
from pkg_resources import load_entry_point ...... pkg_resources.ContextualVersionConflict: (pyasn1 0.1. (/usr/lib/python2./dist-packages), Requirement.parse('pyasn1>=0.1.8'), set(['pyasn1-modules']))
按提示是个版本依赖的错误。
此时先安装pip:
sudo apt-get install python-pip
升级pip:
sudo pip install --upgrade pip
然后对提示的pyasn1升级:
sudo pip install --upgrade pyasn1
再启动scrapy就可以成功了:
Scrapy 1.0. - no active project Usage:
scrapy <command> [options] [args] Available commands:
bench Run quick benchmark test
commands
fetch Fetch a URL using the Scrapy downloader
runspider Run a self-contained spider (without creating a project)
settings Get settings values
shell Interactive scraping console
startproject Create new project
version Print Scrapy version
view Open URL in browser, as seen by Scrapy [ more ] More commands available when run from project directory Use "scrapy <command> -h" to see more info about a command
ubuntu14.04下安装爬虫工具scrapy的更多相关文章
- Ubuntu14.04下安装Hadoop2.5.1 (单机模式)
本文地址:http://www.cnblogs.com/archimedes/p/hadoop-standalone-mode.html,转载请注明源地址. 欢迎关注我的个人博客:www.wuyudo ...
- 二、Ubuntu14.04下安装Hadoop2.4.0 (伪分布模式)
在Ubuntu14.04下安装Hadoop2.4.0 (单机模式)基础上配置 一.配置core-site.xml /usr/local/hadoop/etc/hadoop/core-site.xml ...
- Ubuntu14.04下安装Flash Player
Ubuntu14.04下安装Flash Player youhaidong@youhaidong:~$ sudo apt-get install flashplugin-nonfree [sudo] ...
- Ubuntu14.04下 安装p4c
参考: Github p4c README Ubuntu14.04下 安装p4c 这里提供一个直接安装p4c的脚本:install_p4c.sh. 1.git clone下来p4c: $ git cl ...
- Ubuntu14.04下安装Libsvm,并使用Libsvm
(1)Ubuntu14.04下安装Libsvm 转载:https://blog.csdn.net/katrinawj/article/details/78915874 一.下载: 网址:http:// ...
- ubuntu14.04下安装ffmpeg
ubuntu14.04下安装ffmpeg 一.安装各种依赖包 1.yasm(libx264需要依赖yasm) sudo apt-get install yasm 2.libx264 sudo apt- ...
- ubuntu14.04下安装cudnn5.1.3,opencv3.0,编译caffe及配置matlab和python接口过程记录
已有条件: ubuntu14.04+cuda7.5+anaconda2(即python2.7)+matlabR2014a 上述已经装好了,开始搭建caffe环境. 1. 装cudnn5.1.3,参照: ...
- 在Ubuntu14.04下安装Docker CE(1) - repository篇
从2017年3月开始,Docker开始分为社区版本和企业版,也就是Docker CE和Docker EE, 原来Ubuntu14.04下,通过sudo apt-get install docker.i ...
- ubuntu14.04 下安装有道词典
安装步骤 1.ubuntu14.04.1版本下是不能直接安装有道词典的,首先需要把14.04.版升级为14.04.2版. 在终端窗口中输入以下命令: sudo apt-get update sudo ...
随机推荐
- concurrent.futures 使用及解析
from concurrent.futures import ThreadPoolExecutor, as_completed, wait, FIRST_COMPLETED from concurre ...
- bzoj1862/1056: [Zjoi2006]GameZ游戏排名系统
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1862 http://www.lydsy.com/JudgeOnline/problem.ph ...
- Bzoj4873 [SXOI2017]寿司餐厅
Time Limit: 20 Sec Memory Limit: 512 MBSubmit: 64 Solved: 45 Description Kiana最近喜欢到一家非常美味的寿司餐厅用餐.每 ...
- Bzoj4870 [SXOI2017]组合数问题
Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 155 Solved: 78 Description Input 第一行有四个整数 n, p, k, ...
- LTC 钱包部署
基础环境 系统: CentOS 7.x nodejs: v4.6.0 zeromq: 4.x 安装nodejs + zeromq 基础依赖 yum install -y gcc make gcc-c+ ...
- VMware 12安装虚拟机Mac OS X 10.10不能上网问题
1:从本机中选择打开连接网络,选择本地连接.如果是无线网可以选择无线网. 1: 2: 控制面板--->网络和共享中心 2:选择属性,点击共享按钮. 3:将internet连接共享下面选项都选中 ...
- 【HMOI】小C的填数游戏 DP+线段树维护
[题目描述] 一个长为n的序列,每个元素有一个a[i],b[i],a[i]为0||1,每个点和他相邻的两个点分别有两条边,权值为cost1[i],cost2[i],对于每个区间l,r,我们可以给每一个 ...
- bootstrap 弹窗 数据清除
bootstrap modal操作简单易用, //清除弹窗原数据 $("#create_modal").on("hidden.bs.modal", functi ...
- bASE--Risk
//参考base-4.0.2.jar public class Risk implements Serializable //规则名public String ruleName; //规则包名publ ...
- 代码回滚:Reset、Checkout、Revert 的选择
git reset.git checkout 和 git revert 是你的 Git 工具箱中最有用的一些命令.它们都用来撤销代码仓库中的某些更改,而前两个命令不仅可以作用于提交,还可以作用于特定文 ...