python 安装 Scrapy 报错(已解决)


安装参考:https://doc.scrapy.org/en/latest/intro/install.html#intro-install


本人通过:pip install Scrapy  安装

报以下错

\twisted\internet\test\fake_CAs
    copying src\twisted\internet\test\fake_CAs\thing2-duplicate.pem -> build\lib
.win32-2.7\twisted\internet\test\fake_CAs
    copying src\twisted\internet\test\fake_CAs\thing2.pem -> build\lib.win32-2.7
\twisted\internet\test\fake_CAs
    copying src\twisted\mail\test\rfc822.message -> build\lib.win32-2.7\twisted\
mail\test
    copying src\twisted\words\im\instancemessenger.glade -> build\lib.win32-2.7\
twisted\words\im
    copying src\twisted\words\xish\xpathparser.g -> build\lib.win32-2.7\twisted\
words\xish
    running build_ext
    error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
Get it from http://aka.ms/vcpython27


    ----------------------------------------
Command "d:\python\python27\python.exe -u -c "import setuptools, tokenize;__file
__='c:\\users\\admini~1\\appdata\\local\\temp\\pip-build-9gywq7\\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\a
dmini~1\appdata\local\temp\pip-_jok3e-record\install-record.txt --single-version
-externally-managed --compile" failed with error code 1 in c:\users\admini~1\app
data\local\temp\pip-build-9gywq7\Twisted\


解决方法

(1)、先安装:twisted

(2)、下载地址:https://pypi.python.org/simple/twisted,下载了Twisted-15.0.0.win32-py2.7.exe(Twisted 14.0 以上版本即可)

(3)、然后再使用:pip install Scrapy

安装成功!如下图:



【总结】

通常情况,安装使用 pip install Scrapy 即可完成。


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值