码迷,mamicode.com
首页 > Windows程序 > 详细

windows安装scrapy

时间:2018-05-06 00:19:54      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:ken   manage   .com   装包   highlight   target   出现   via   temp   

1.安装Twisted

直接pip install Twisted

然后报错

    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

    ----------------------------------------
Command "c:\users\zb\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__=‘C:\\Users\\zb\\AppData\\Local\\Temp\\pip-build-10ew2ma_\\Twisted\\setup.py‘;f=getattr(tokenize, ‘open‘, open)(__file__);code=f.read().replace(‘\r\n‘, ‘\n‘);f.close();exec(compile(code, __file__, ‘exec‘))" install --record C:\Users\zb\AppData\Local\Temp\pip-85cixft1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\zb\AppData\Local\Temp\pip-build-10ew2ma_\TwistedYou are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command.

 

最后一句提升让升级pip,然后运行 python -m pip install --upgrade pip 运行 

技术分享图片

这时候我们成功升级了pip了。然后重新 安装pip install twisted运行之后看到出现 如下错误

    building ‘twisted.test.raiser‘ extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
字面意思看需要安装Microsoft Visual C++ 14.0 ,但是这个东西安装起来很麻烦,而且安装上了也不一定准确,这个时候呢,我们一般就考虑第三方的python模块安装包
http://www.lfd.uci.edu/~gohlke/pythonlibs/

然后搜索twisted,下载对应的版本,下图cp36就是python3.6x版本用的,win32是指的python的位数,cmd输入python查看python的版本,这里我就下载下面蓝色x

技术分享图片

技术分享图片

 https://download.lfd.uci.edu/pythonlibs/t5yhk4lc/Twisted-18.4.0-cp36-cp36m-win32.whl

 

windows安装scrapy

标签:ken   manage   .com   装包   highlight   target   出现   via   temp   

原文地址:https://www.cnblogs.com/c-x-a/p/8996716.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!