温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

win10下怎么安装Scrapy以及搭建其环境

发布时间:2021-08-06 11:06:07 来源:亿速云 阅读:413 作者:chen 栏目:互联网科技

这篇文章主要讲解了“win10下怎么安装Scrapy以及搭建其环境”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“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 添加洗系统环境变量

win10下怎么安装Scrapy以及搭建其环境
 

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 这三个

win10下怎么安装Scrapy以及搭建其环境

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

win10下怎么安装Scrapy以及搭建其环境

    安装完成以后查看scrapy版本Scrapy version

 然后Scrapy就可以在windows系统上运行了

截图留念

win10下怎么安装Scrapy以及搭建其环境

感谢各位的阅读,以上就是“win10下怎么安装Scrapy以及搭建其环境”的内容了,经过本文的学习后,相信大家对win10下怎么安装Scrapy以及搭建其环境这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI