Walks

网络安全爱好者

Python3学习系列(一):Scrapy在Python3环境下的安装

《Python3学习系列(一):Scrapy在Python3环境下的安装》

前言

一般大家都知道,当你学习一门新技术的时候,最麻烦的往往是环境的搭建。

同时,我也挺烦搭建环境的,当我在学习Python爬虫的时候,这个Scrapy框架的安装真的让我很无语,为了让接下来学习的人脱坑。第一篇就先写环境的搭建。

Scrapy安装介绍

Scrapy的安装有多种方式,它支持Python2.7版本及以上或Python3.3版本及以上。

下面说明Python3环境下的安装过程。

Scrapy依赖的库比较多,至少需要依赖库有Twisted 14.0,lxml 3.4,pyOpenSSL 0.14。

而在不同平台环境又各不相同,所以在安装之前最好确保把一些基本库安装好,尤其是Windows。

安装步骤

  • 设置环境变量

我的电脑->属性->高级系统设置->环境变量

《Python3学习系列(一):Scrapy在Python3环境下的安装》

《Python3学习系列(一):Scrapy在Python3环境下的安装》

在path中追加D:\python34;D:\python34\Scripts;(路径为自己Python的安装路径)

《Python3学习系列(一):Scrapy在Python3环境下的安装》

那我们为什么要添加环境变量呢? 

因为方便。当我们在cmd中输入python的时候,系统是识别不了这个命令的,而添加了环境变量,系统就会在这些路径里面去找python文件并且运行。 

用户变量和系统变量的区别:

用户变量只对当前用户有效,系统变量对所用用户都有效。且优先权   系统变量>用户变量

  • 安装lxml

最好的安装方式是通过wheel文件来安装,http://www.lfd.uci.edu/~gohlke/pythonlibs/,从该网站找到lxml的相关文件。

假如是Python3.5版本,WIndows 64位系统,那就找到lxml‑3.7.2‑cp35‑cp35m‑win_amd64.whl 这个文件并下载,然后通过pip安装。

 下载之后,运行如下命令安装:

pip3 install wheel pip3
install lxml‑3.7.2‑cp35‑cp35m‑win_amd64.whl

即可完成lxml的安装,其他文件替换文件名即可。

  • 安装zope.interface

到官方网站https://pypi.python.org/pypi/zope.interface#downloads下载对应版本的wheel文件,然后pip安装。

比如Python 3.5版本,Windows 64位系统,就下载zope.interface-4.3.3-cp35-cp35m-win_amd64.whl。

 然后安装wheel文件即可,命令如下:

pip3 install zope.interface-4.3.3-cp35-cp35m-win_amd64.whl

其他版本替换文件名即可。

  • 安装pyOpenSSL

官方网站下载wheel文件,https://pypi.python.org/pypi/pyOpenSSL#downloads,如当前最新版本名称是pyOpenSSL-16.2.0-py2.py3-none-any.whl,下载后安装即可。

pip3 install pyOpenSSL-16.2.0-py2.py3-none-any.whl
  • 安装Twisted

同理,http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted下载wheel文件,利用pip安装即可。
如Python 3.5版本,Windows 64位系统,下载
Twisted‑17.1.0‑cp35‑cp35m‑win_amd64.whl,然后pip安装。

pip3 install Twisted‑17.1.0‑cp35‑cp35m‑win_amd64.whl
  • 安装pywin32

从官方网站 https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/ 下载对应版本的安装包安装即可。

  • 安装Scrapy

最后安装Scrapy即可,依然使用pip,命令如下:

pip3 install Scrapy

 安装成功。。。

《Python3学习系列(一):Scrapy在Python3环境下的安装》

 

点赞
  1. xx说道:

    老哥怎么知道要这样装的,累屎了

    1. walks说道:

      度娘。不过比较难找。

  2. air max 270说道:

    My husband and i felt absolutely relieved Raymond managed to carry out his inquiry out of the precious recommendations he received in your web site. It's not at all simplistic to simply choose to be giving away tactics which people may have been trying to sell. So we understand we've got you to be grateful to for this. These illustrations you have made, the simple site navigation, the friendships you will make it easier to create - it is most unbelievable, and it is making our son in addition to the family understand that situation is thrilling, and that's tremendously serious. Many thanks for the whole lot!

  3. adidas tubular说道:

    I precisely had to thank you so much yet again. I am not sure what I could possibly have undertaken without these methods shared by you over my field. This was an absolute daunting dilemma in my circumstances, but noticing the skilled style you managed that took me to leap for joy. Now i'm thankful for the information and even wish you really know what a great job you were accomplishing instructing most people all through your webpage. I'm certain you have never encountered any of us.

  4. I am commenting to let you understand what a fine discovery my wife's princess developed reading yuor web blog. She came to find some pieces, with the inclusion of what it is like to have a very effective coaching mindset to have a number of people smoothly gain knowledge of various very confusing subject areas. You really exceeded her desires. I appreciate you for distributing the good, dependable, educational and also unique thoughts on that topic to Julie.

  5. hermes belts说道:

    I precisely needed to appreciate you once again. I'm not certain what I might have used without the type of thoughts shown by you directly on such theme. It was before a very daunting concern in my position, but taking note of the very skilled manner you handled the issue made me to jump for joy. Now i am happier for this guidance and even hope that you are aware of an amazing job you're undertaking training men and women through the use of your webpage. I am sure you haven't come across all of us.

  6. air jordan shoes说道:

    I'm just writing to make you know what a nice experience my child obtained browsing your site. She figured out a wide variety of pieces, most notably what it is like to possess a very effective coaching heart to get the mediocre ones without difficulty learn about various extremely tough subject matter. You actually did more than our own desires. Thank you for giving the necessary, trustworthy, explanatory and as well as unique thoughts on that topic to Janet.

  7. nike polo shirts说道:

    I intended to send you the very small note so as to give thanks the moment again considering the exceptional basics you've shared in this case. It is incredibly generous of people like you to make freely what exactly most people would've marketed as an e-book in order to make some dough on their own, mostly considering the fact that you might well have tried it if you decided. The techniques in addition served to become a fantastic way to fully grasp the rest have similar eagerness much like my very own to understand great deal more with respect to this matter. I think there are millions of more pleasant situations in the future for folks who start reading your website.

  8. yeezy说道:

    My wife and i were really glad when Albert managed to finish off his survey from the precious recommendations he came across from your own blog. It is now and again perplexing just to continually be giving for free methods which usually the others could have been trying to sell. And now we fully grasp we need the writer to appreciate for that. All the explanations you have made, the straightforward site navigation, the friendships you can give support to promote - it is all astonishing, and it is helping our son in addition to the family understand the issue is awesome, which is rather serious. Many thanks for all the pieces!

  9. I wanted to post you that little bit of word to be able to say thanks over again for these unique solutions you've documented above. It's really seriously generous of people like you to provide openly just what most people would've offered for an electronic book to generate some dough on their own, most notably considering that you could have tried it if you ever decided. These thoughts as well served as a good way to be sure that most people have the identical desire like my personal own to find out a lot more with regards to this problem. I'm certain there are millions of more pleasant opportunities up front for those who scan your site.

  10. I enjoy you because of each of your labor on this site. My daughter take interest in working on investigation and it's really easy to see why. Most people know all about the dynamic mode you deliver priceless thoughts via this blog and in addition improve participation from other people about this concept and my simple princess is without question becoming educated a lot. Take advantage of the rest of the year. You're the one conducting a powerful job.

  11. moncler jackets说道:

    Thank you so much for giving everyone an extremely nice possiblity to read critical reviews from this blog. It really is so kind and jam-packed with a good time for me personally and my office acquaintances to search your blog nearly three times every week to read through the new guidance you have got. Not to mention, we are at all times contented considering the special tactics you serve. Certain two points on this page are certainly the simplest we've had.

  12. My spouse and i got ecstatic when Chris managed to do his basic research through your ideas he made when using the blog. It's not at all simplistic to just find yourself handing out instructions people have been making money from. We really see we now have you to appreciate because of that. Those explanations you made, the simple site navigation, the relationships you can assist to foster - it is most incredible, and it is aiding our son and our family feel that that idea is thrilling, and that's really fundamental. Thanks for the whole thing!

  13. adidas yeezy说道:

    A lot of thanks for your whole labor on this website. My aunt really likes conducting internet research and it's really obvious why. My partner and i hear all concerning the powerful medium you make invaluable guidance by means of this website and therefore encourage response from other individuals on that content while my daughter is now being taught a great deal. Take pleasure in the remaining portion of the new year. You have been conducting a pretty cool job.

  14. I want to show my thanks to the writer just for rescuing me from this situation. As a result of looking out through the internet and meeting thoughts which were not productive, I assumed my entire life was done. Living devoid of the solutions to the issues you have solved by means of the blog post is a critical case, as well as ones that would have negatively damaged my career if I had not noticed your blog. Your personal expertise and kindness in maneuvering every item was very useful. I am not sure what I would have done if I hadn't encountered such a step like this. I'm able to at this time look ahead to my future. Thank you very much for this impressive and effective guide. I will not hesitate to endorse the sites to anyone who needs direction about this subject.

  15. I would like to express my thanks to the writer just for rescuing me from this type of scenario. Right after exploring through the the net and obtaining suggestions which were not beneficial, I thought my life was over. Being alive devoid of the approaches to the problems you have sorted out by way of your guideline is a critical case, and the kind that might have adversely affected my career if I had not discovered your website. Your main skills and kindness in maneuvering the whole thing was helpful. I am not sure what I would have done if I had not come across such a solution like this. I am able to at this point relish my future. Thanks so much for this skilled and sensible help. I won't think twice to recommend your web blog to anybody who desires assistance on this situation.

  16. yeezy boost 350说道:

    Thank you a lot for providing individuals with an extraordinarily splendid opportunity to discover important secrets from this site. It's usually so great and packed with a lot of fun for me personally and my office mates to search your web site more than three times every week to learn the newest things you have got. Not to mention, I am just always fulfilled with the perfect techniques you give. Certain two tips in this post are easily the best we have ever had.

  17. nike air max 90说道:

    I have to show some appreciation to this writer for rescuing me from such a scenario. Right after searching through the world-wide-web and obtaining things which are not powerful, I thought my life was gone. Being alive without the answers to the difficulties you've fixed all through this short post is a serious case, as well as ones that might have adversely damaged my entire career if I hadn't come across your web site. Your own personal natural talent and kindness in handling all the things was crucial. I'm not sure what I would've done if I had not discovered such a point like this. I am able to at this moment look forward to my future. Thanks for your time so much for your impressive and results-oriented guide. I will not hesitate to recommend your web blog to anybody who wants and needs assistance about this area.

  18. baseball jerseys说道:

    I precisely wished to thank you so much once again. I'm not certain what I might have sorted out without the type of tips and hints shown by you regarding this industry. It has been an absolute terrifying setting for me personally, nevertheless being able to view a skilled style you managed it forced me to cry for happiness. I am thankful for the support and as well , sincerely hope you realize what a powerful job you are getting into training people today with the aid of your site. More than likely you've never come across any of us.

  19. off white hoodie说道:

    I have to express appreciation to you just for bailing me out of such a condition. After looking through the world-wide-web and coming across advice which were not productive, I was thinking my life was done. Being alive without the presence of answers to the problems you've sorted out by means of the guide is a serious case, and ones which might have badly damaged my career if I hadn't encountered your blog. Your actual mastery and kindness in dealing with all the things was vital. I am not sure what I would've done if I hadn't come upon such a step like this. I'm able to now look forward to my future. Thanks so much for this professional and results-oriented guide. I won't think twice to propose your site to anybody who would need recommendations about this issue.

  20. My wife and i ended up being now satisfied that Peter could round up his research from your ideas he discovered out of the weblog. It is now and again perplexing just to continually be giving for free guidelines that many many people have been making money from. Therefore we fully understand we have got you to appreciate for this. All the explanations you made, the easy website menu, the relationships you make it easier to engender - it is mostly awesome, and it's really making our son and our family consider that the topic is amusing, and that is particularly fundamental. Thank you for the whole thing!

  21. jordan retro说道:

    I would like to express my passion for your generosity giving support to women who really need help with this study. Your special commitment to passing the message all over had become particularly effective and has continuously allowed guys like me to get to their aims. Your own informative useful information denotes a whole lot a person like me and somewhat more to my peers. Regards; from everyone of us.

  22. I have to express my appreciation for your kindness for those people who should have help with this important study. Your real commitment to getting the solution along became extremely interesting and has encouraged people like me to attain their pursuits. The helpful facts entails a lot to me and extremely more to my peers. Thank you; from all of us.

  23. jordan retro说道:

    I truly wanted to compose a small remark to appreciate you for all the remarkable strategies you are showing on this site. My extensive internet search has finally been recognized with wonderful facts and techniques to share with my guests. I would tell you that we readers are definitely lucky to exist in a wonderful place with many marvellous people with helpful tactics. I feel very much happy to have seen your entire web page and look forward to so many more entertaining moments reading here. Thanks again for all the details.

  24. I needed to compose you a bit of observation to thank you so much yet again just for the pleasing basics you have provided on this site. It's surprisingly open-handed with people like you to allow unhampered precisely what most people could possibly have supplied as an e book to help make some cash on their own, certainly considering that you might have done it if you wanted. The strategies additionally served to provide a fantastic way to fully grasp that other individuals have similar desire the same as mine to grasp many more with respect to this matter. I believe there are a lot more enjoyable situations ahead for individuals that find out your website.

  25. red bottom shoes说道:

    I and also my pals have been examining the excellent helpful hints on your web site and before long came up with an awful feeling I had not expressed respect to the site owner for them. The young boys appeared to be happy to study them and have now surely been having fun with these things. Appreciate your being quite thoughtful and for using some essential things millions of individuals are really wanting to discover. My personal honest apologies for not saying thanks to you sooner.

  26. I'm also writing to let you be aware of of the terrific encounter our girl undergone reading your webblog. She discovered several pieces, with the inclusion of what it's like to have a great teaching style to get certain people smoothly completely grasp certain very confusing topics. You actually did more than her desires. Thanks for producing these valuable, healthy, edifying and in addition easy guidance on that topic to Evelyn.

  27. Thanks so much for providing individuals with an exceptionally terrific chance to check tips from this blog. It can be so terrific and as well , full of fun for me personally and my office friends to search the blog nearly thrice per week to read the newest secrets you will have. And lastly, we are usually happy concerning the fantastic concepts you serve. Certain 3 areas in this post are in fact the simplest I have had.

  28. I precisely had to say thanks all over again. I do not know the things that I might have done without the entire tactics contributed by you about such a area. It truly was the hard difficulty in my view, however , coming across the well-written avenue you managed that took me to cry with happiness. Extremely happier for your service as well as sincerely hope you know what an amazing job you have been undertaking training the rest through your site. Probably you've never met all of us.

  29. moncler outlet说道:

    I want to point out my admiration for your kind-heartedness in support of folks that require assistance with in this topic. Your special dedication to passing the solution all over appeared to be particularly good and have really encouraged employees much like me to get to their ambitions. Your new warm and helpful help entails a whole lot a person like me and far more to my office colleagues. Many thanks; from each one of us.

  30. I intended to compose you one little bit of note in order to say thanks a lot over again about the striking information you have featured on this site. It's so open-handed with people like you to grant unreservedly exactly what a lot of people could have advertised as an e book to make some money for their own end, notably considering that you might well have done it if you ever considered necessary. The thoughts also worked to become a fantastic way to recognize that many people have a similar zeal similar to my personal own to grasp very much more around this problem. I'm sure there are lots of more enjoyable situations ahead for folks who see your website.

  31. My wife and i felt so satisfied Michael could finish off his analysis through your ideas he made in your web site. It is now and again perplexing to simply always be giving away guidelines which usually many people could have been making money from. So we already know we have you to appreciate for that. The type of illustrations you've made, the straightforward site navigation, the relationships you can help to instill - it's everything wonderful, and it's really facilitating our son in addition to the family consider that the idea is interesting, and that is seriously important. Thanks for the whole thing!

  32. birkin bag说道:

    Thank you a lot for giving everyone an extraordinarily wonderful chance to read from this blog. It is usually very sweet plus packed with a lot of fun for me personally and my office mates to search your site at minimum thrice a week to see the newest things you will have. Not to mention, I am also actually happy with your exceptional pointers you serve. Certain 1 points in this posting are without a doubt the finest I've had.

  33. air jordan 4说道:

    I and my pals have been looking at the nice tips and tricks on the website and so unexpectedly came up with an awful suspicion I never thanked you for those secrets. These young boys happened to be totally stimulated to study them and have seriously been taking pleasure in these things. I appreciate you for getting simply thoughtful and also for having variety of superb subject matter millions of individuals are really desperate to understand about. Our own sincere apologies for not expressing appreciation to you sooner.

  34. I as well as my guys have already been following the great items located on your site while then developed an awful feeling I never thanked the site owner for those strategies. Most of the guys became joyful to study all of them and have now in reality been loving them. I appreciate you for really being indeed kind as well as for pick out some tremendous subject areas millions of individuals are really desirous to be aware of. My very own sincere apologies for not saying thanks to you earlier.

  35. I truly wanted to post a simple word so as to express gratitude to you for those unique steps you are posting here. My long internet search has now been recognized with high-quality points to talk about with my two friends. I would say that many of us website visitors are really fortunate to exist in a useful site with very many wonderful professionals with very helpful tactics. I feel somewhat lucky to have come across your entire webpages and look forward to really more pleasurable times reading here. Thank you once again for a lot of things.

  36. I simply needed to thank you very much once more. I do not know the things that I would've created without the actual smart ideas shown by you directly on such a concern. It actually was a real terrifying issue in my circumstances, nevertheless understanding a professional way you managed it took me to leap over fulfillment. I will be happier for this guidance as well as have high hopes you know what a great job you were carrying out teaching other individuals through the use of your website. Most likely you've never got to know all of us.

  37. cheap jordans说道:

    I truly wanted to write a small remark so as to thank you for these unique points you are giving out here. My prolonged internet investigation has finally been compensated with wonderful ideas to exchange with my company. I would assert that many of us visitors are really fortunate to exist in a superb community with very many lovely professionals with very helpful advice. I feel pretty grateful to have seen your weblog and look forward to really more cool minutes reading here. Thanks once again for everything.

  38. I wanted to send a remark in order to express gratitude to you for those marvelous guides you are writing on this site. My incredibly long internet look up has at the end been compensated with awesome suggestions to exchange with my classmates and friends. I 'd express that we readers are undeniably lucky to live in a really good website with many lovely individuals with beneficial strategies. I feel very blessed to have come across your webpage and look forward to plenty of more excellent moments reading here. Thanks once more for all the details.

  39. yeezy boost 350说道:

    I not to mention my friends came looking through the best points located on your site and then before long came up with a horrible suspicion I had not expressed respect to the blog owner for those secrets. The guys had been certainly glad to read through all of them and now have in truth been having fun with these things. Appreciate your genuinely so kind as well as for obtaining some exceptional subject areas most people are really eager to be aware of. My very own sincere apologies for not saying thanks to sooner.

  40. adidas nmd说道:

    I'm commenting to let you understand of the awesome encounter my wife's girl undergone reading through yuor web blog. She came to understand numerous issues, which included what it is like to possess an ideal coaching spirit to let folks effortlessly know precisely specified multifaceted issues. You actually exceeded our expectations. I appreciate you for rendering these essential, dependable, explanatory as well as cool tips about the topic to Sandra.

发表评论

电子邮件地址不会被公开。 必填项已用*标注