win10 安装scrapy
在win10的环境下安装scrapy,并不能直接按照官网的手册(http://doc.scrapy.org/en/1.0/intro/install.html)一次性安装成功,根据我自己的安装过程中遇到的问题,特意整理了一下安装过程
1.下载安装python2.7.11
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的更多相关文章
- WIN10安装scrapy/channels等不成功的解决方式
问题 在Win10机器上,不管是安装scrapy还是channels,都需要安装一个包,叫做twisted.正是这个twisted,导致出现一系列的奇葩错误,让我一度以为我的Pycharm坏了,还改了 ...
- win10安装scrapy
前提已经安装好python2.7背景:scrapy框架,windows下的部署工作挺麻烦的.需要用的资源整合了一下可以为以后需要的同学节省不少时间. 相关文件:网盘链接: http://pan.bai ...
- win10下安装scrapy出现错误的处理
一.背景: 在win10的dos窗口下使用命令pip install scrapy安装scrapy时,出现“ error: Microsoft Visual C++ 14.0 is required. ...
- win10在Pycharm中安装scrapy
查看官网说明 发现推荐是安装Anaconda 或 Miniconda,这东西有点大而全,感觉目前用不上.所以没这样做. 直接安装scrapy 如果直接装会报错的,参考文章就可以解决. 这里记一下组件下 ...
- win10 64位 安装scrapy
在学习python时,不可避免下载了Anaconda,当我打算写爬虫时,urllib,requests,selenium,pyspider都已经安装好了,可以直接使用了,但是有一天我想要使用scrap ...
- win10虚拟环境安装scrapy
说明:本人用的是python3.6版本,64位系统. 第一步:创建并激活虚拟环境 virtualenv scrapy scrapy\Scripts\activate 第二步:安装lxml pip in ...
- python3.6安装Scrapy
环境:win10(64位), Python3.6(64位) 1.安装pyhthon 这个就不多说了,对应版本就下载对应的依赖包 2.安装pywin32 在windows下,必须安装pywin32,安装 ...
- 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 ...
- python 3.6.1 安装scrapy踩坑之旅
系统环境:win10 64位系统安装 python基础环境配置不做过多的介绍 window环境安装scrapy需要依赖pywin32,下载对应python版本的exe文件执行安装,下载的pywin32 ...
随机推荐
- Linux编程之《守护进程》
Intro ----- 守护进程,也就是通常说的Daemon进程,是Linux中的后台服务进程.它是一个生存期较长的进程,通常独立于控制终端并且周期性地执行某种任务或等待处理某些发生的事件.守护进程常 ...
- Krypton Factor
Krypton Factor Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)To ...
- nginx.conf配置及优化相关
nginx.conf配置文件内容 user www www; worker_processes ; worker_rlimit_nofile ; error_log /data/nginx/logs/ ...
- python打印详细的异常信息
#!/usr/bin/env python #coding=utf-8 import traceback try: 1/0 except Exception, e: print e print tra ...
- css笔记01:CSS例子
body { margin:0; padding:0; background:#000 url('images/backgrounds/star.png') no-repeat fixed; font ...
- iOS银行卡合法性校验
项目中用到了校验银行卡,就拿来贴上来了 + (BOOL)checkCardNo:(NSString*)cardNo;//判断银行卡 + (BOOL)checkCardNo:(NSString*)car ...
- Android客户端token简介和简单应用
一.什么是Token Token是服务端生成的一串字符串,以作客户端进行请求的一个令牌,当第一次登录后,服务器生成一个Token便将此Token返回给客户端,以后客户端只需带上这个Token前来请求数 ...
- 管理Activity
开源中国摘取的代码,这个可以管理activity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ...
- javaweb学习总结十一(JAXP对XML文档进行DOM解析)
一:将内存中写好的xml文件读取到硬盘上 二:DOM方式对xml文件进行增删改查 1:添加节点(默认是在最后的子节点后面添加) @Test // 向元素中添加节点<version>1.0& ...
- [设计模式]<<设计模式之禅>>工厂方法模式
1 女娲造人的故事 东汉<风俗通>记录了一则神话故事:“开天辟地,未有人民,女娲搏黄土做人”,讲述的内容就是大家非常熟悉的女娲造人的故事.开天辟地之初,大地上并没有生物,只有苍茫大地,纯粹 ...