在win10的环境下安装scrapy,并不能直接按照官网的手册(http://doc.scrapy.org/en/1.0/intro/install.html)一次性安装成功,根据我自己的安装过程中遇到的问题,特意整理了一下安装过程

1.下载安装python2.7.11

https://www.python.org/

 

2.安装完成之后,把安装路径和脚本路径添加到path中,譬如:C:\Python27\;C:\Python27\Scripts\;

 

3.安装pywin32,在下面的连接中下载最新版的pywin32

http://sourceforge.net/projects/pywin32/files/pywin32/

我在安装pywin32过程中遇到错误提示:

python version 2.7 required,which was not found in the registry

这是因为注册表不能识别出python2.7,解决方法就是新建一个register.py文件,运行下面的代码

#
# script to register Python 2.0 or later for use with win32all
# and other extensions that require Python registry settings
#
# written by Joakim Loew for Secret Labs AB / PythonWare
#
# source:
# http://www.pythonware.com/products/works/articles/regpy20.htm
#
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html import sys from _winreg import * # tweak as necessary
version = sys.version[:3]
installpath = sys.prefix regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % (
installpath, installpath, installpath
) def RegisterPy():
try:
reg = OpenKey(HKEY_CURRENT_USER, regpath)
except EnvironmentError as e:
try:
reg = CreateKey(HKEY_CURRENT_USER, regpath)
SetValue(reg, installkey, REG_SZ, installpath)
SetValue(reg, pythonkey, REG_SZ, pythonpath)
CloseKey(reg)
except:
print "*** Unable to register!"
return
print "--- Python", version, "is now registered!"
return
if (QueryValue(reg, installkey) == installpath and
QueryValue(reg, pythonkey) == pythonpath):
CloseKey(reg)
print "=== Python", version, "is already registered!"
return
CloseKey(reg)
print "*** Unable to register!"
print "*** You probably have another Python installation!" if __name__ == "__main__":
RegisterPy()

运行成功后显示:python 2.7 is already registered,然后再次安装pywin32

 

4.接着安装lxml,并不能直接使用命令pip install lxml来安装,此时就使用第三方的安装方法,到这里(http://www.lfd.uci.edu/~gohlke/pythonlibs/)下载文件:

lxml-3.5.0-cp27-none-win32.whl

然后在存放该下载文件的目录下执行命令:pip install lxml-3.5.0-cp27-none-win32.whl

 

5.运行命令:pip install scrapy来安装scrapy,如果遇到如下错误提示:

Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat

则到这里:https://www.microsoft.com/en-us/download/details.aspx?id=44266 下载并安装vc++插件

win10 安装scrapy的更多相关文章

  1. WIN10安装scrapy/channels等不成功的解决方式

    问题 在Win10机器上,不管是安装scrapy还是channels,都需要安装一个包,叫做twisted.正是这个twisted,导致出现一系列的奇葩错误,让我一度以为我的Pycharm坏了,还改了 ...

  2. win10安装scrapy

    前提已经安装好python2.7背景:scrapy框架,windows下的部署工作挺麻烦的.需要用的资源整合了一下可以为以后需要的同学节省不少时间. 相关文件:网盘链接: http://pan.bai ...

  3. win10下安装scrapy出现错误的处理

    一.背景: 在win10的dos窗口下使用命令pip install scrapy安装scrapy时,出现“ error: Microsoft Visual C++ 14.0 is required. ...

  4. win10在Pycharm中安装scrapy

    查看官网说明 发现推荐是安装Anaconda 或 Miniconda,这东西有点大而全,感觉目前用不上.所以没这样做. 直接安装scrapy 如果直接装会报错的,参考文章就可以解决. 这里记一下组件下 ...

  5. win10 64位 安装scrapy

    在学习python时,不可避免下载了Anaconda,当我打算写爬虫时,urllib,requests,selenium,pyspider都已经安装好了,可以直接使用了,但是有一天我想要使用scrap ...

  6. win10虚拟环境安装scrapy

    说明:本人用的是python3.6版本,64位系统. 第一步:创建并激活虚拟环境 virtualenv scrapy scrapy\Scripts\activate 第二步:安装lxml pip in ...

  7. python3.6安装Scrapy

    环境:win10(64位), Python3.6(64位) 1.安装pyhthon 这个就不多说了,对应版本就下载对应的依赖包 2.安装pywin32 在windows下,必须安装pywin32,安装 ...

  8. 96、python version 3.6 required,which was not fount in the registry(python3.6安装scrapy)

    在安装scrapy时遇到问题 环境:win10(64位), Python3.6(64位) 安装scrapy: 1.安装wheel(安装后,便支持通过wheel文件安装软件) pip3 install ...

  9. python 3.6.1 安装scrapy踩坑之旅

    系统环境:win10 64位系统安装 python基础环境配置不做过多的介绍 window环境安装scrapy需要依赖pywin32,下载对应python版本的exe文件执行安装,下载的pywin32 ...

随机推荐

  1. Android进阶笔记06:Android 实现扫描二维码实现网页登录

    一. 扫描二维码登录的实现机制: 详细流程图: (1)PC端打开网页(显示出二维码),这时候会保存对应的randnumber(比如:12345678). (2)Android客户端扫码登录,Andro ...

  2. jQuery数组处理

    1. $.each(array, [callback]) 遍历[常用] 解释: 1.不同于例遍 jQuery 对象的 $().each() 方法,此方法可用于例遍任何对象(不仅仅是数组哦~). 2.回 ...

  3. iOS 数据类型

    标签: 数据类型 1.Objective-C数据类型可以分为:基本数据类型.对象数据类型和id类型. 2.基本数据类型有:int.float.double和char类型. 3.对象类型就是类或协议所声 ...

  4. Objective-C ,ios,iphone开发基础:几个常用类-NSString

    第一个字符串: //必须在字符串的前面加上@符号, NSString* str=@"shouqiang_Wei";//输出以%@输出. NSLog(@"%@", ...

  5. MySQL多实例配置

    实验环境:RHEL6.4为最小化安装,mysql安装包为通用二进制安装包,版本为mysql-5.6.26 创建mysql用户 #useradd –M –s /sbin/nologin mysql #y ...

  6. WIN2003服务器IIS下如何开启GZIP压缩

    在上一篇文章黑客流谈到了关于网页打开速度对SEO的影响,其中提到了网页开启Gzip压缩的好处,接下来我来和大家分享一下WINDOWS系统IIS服务器下如何开启Gzip压缩. 首先我们来了解一下什么是G ...

  7. Oracle_11g中解决被锁定的scott用户的方法(转载)

    转自:http://www.2cto.com/database/201402/277206.html Oracle 11g中修改被锁定的用户:scott 在安装完Oracle11g和创建完oracle ...

  8. 【线性结构上的动态规划】UVa 11584 - Partitioning by Palindromes

    回文串问题.给出一个字符串,问最少可以划分为多少个字符串子串. 对于判断是否为回文串,对于不是很长的字符串,可以采取直接暴力,即从两边向中间收缩判断字符相等. bool is_pali(int l, ...

  9. 【线性结构上的动态规划】UVa 11400 - Lighting System Design

    Problem F Lighting System Design Input: Standard Input Output: Standard Output You are given the tas ...

  10. 理解Android系统的进程间通信原理(一)----RPC中的代理模式

    Android系统中的进程间通信是通过一个轻量级的RPC(Remote Procedure Call远程进程调用)和AIDL(Android Interface Definination Langua ...