您的位置:首页 > 编程语言 > Python开发

最新win10下安装Scrapy 及其环境搭建

2015-12-30 00:00 639 查看
摘要: 最新win10下安装Scrapy 及其环境搭建,安装流程

说在前面

我的系统目前是win10 64位 scrapy目前只支持到python27

在装scrapy之前 装过visual studio community 在MS的官网下载

Scrapy官网有相应的简单教程

https://scrapy-chs.readthedocs.org/zh_CN/0.24/intro/install.html

注意 不同后缀名安装方法

a. exe 直接点击安装
b.msi 文件 用pip install file_name
c. egg文件 cmd命令行进入到.egg文件所在目录pip install file_name
d.whl文件 改后缀名为.zip 解压后 将解压后的最短文件明拷贝到 python27安装位置的Lib文件夹里

------具体安装方法如下 --------

(一) 安装Python 2.7

(二) Python Package: pip and setuptools.

现在 pip 依赖 setuptools ,如果未安装,则会自动安装 setuptools 。 After installing Python, follow these steps before installing Scrapy:

#安装完Python以后通过以下步骤来安装 Scrapy:
add the C:python27Scripts and C:python27 folders to the system path by adding those directories to the PATH environment variable from theControl Panel.
#把C:/python27/Scripts 和 C:/python27 添加洗系统环境变量



some binary packages that Scrapy depends on (like Twisted, lxml and pyOpenSSL) require a compiler available to install, and fail if you don’t have Visual Studio installed. You can find Windows installers for those in the following links. Make sure you respect your Python version and Windows architecture.
#Scrapy按照时需要有lxml 和 pyOpenSSL Twisted,如果你没有安装 Visual Studio 你可以寻找和你的python版本和系统版本一致的Windows architecture

--------
搭建 scrapy环境----------------

(三) lxml.

大多数Linux发行版自带了lxml。如果缺失,请查看 http://lxml.de/installation.html 【python编写的库 windows下要安装】

(四) OpenSSL.

除了Windows(请查看 平台安装指南)之外的系统都已经提供。
1. #通过以下步骤来安装OPENSSL
go to Win32 OpenSSL page #访问Win32 OpenSSL官网
download OpenSSL for your Windows and architecture (the regular version, not the light one)
#下载安装OPENSSL在你的系统上
add the c:openssl-win32bin (or similar) directory to your PATH, the same way you added python27 in the first step“ in the first step
#用添加Python环境变量一样的方法把OPENSSL所在目录添加到你的系统环境变量里

(五) Twisted 安装

Twisted 安装又需要 Zope.Interface ,PyWin32, PyOpenSSL 这三个





http://twistedmatrix.com/trac/wiki/Downloads
所需要的这三个都可以下载 但是 Twisted 点开却是乱码,没办法下载,我在这个地方找到了 替代链接
https://pypi.python.org/packages/2.7/T/Twisted/Twisted-13.0.0.win32-py2.7.msi
----------------------------

(六) Scrapy 安装

通过以上的步骤你的系统已经具备了安装Scrapy的环境,接下来通过以下命令开始安装Scrapy:
pip install Scrapy



安装完成以后查看scrapy版本Scrapy version
然后Scrapy就可以在windows系统上运行了
截图留念



参考网站(为主)

https://scrapy-chs.readthedocs.org/zh_CN/0.24/intro/install.html

http://www.shangxueba.com/jingyan/1645080.html

http://blog.csdn.net/androidzhaoxiaogang/article/details/8479140

http://blog.163.com/like_playboy/blog/static/19439238820157221571826/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python scrapy