windows下安装Scrapy出错cl.exe failed with exit status2解决方法

在用pip install Scrapy安装scrapy时出错

error: command 'C:\\Users\\rainer\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status2

网上找了很久,发现很多人遇到这个错误没有解决,最后在stackoverflow找到解决办法改用这个命令安装lxml就好了:set STATICBUILD=true && pip install lxml

原帖地址:http://stackoverflow.com/questions/20460890/lxml-install-on-windows-7-using-pip-and-python-2-7


If you have a compiler installed (tested with VS C++ 2008 Express), you can simply run:

set STATICBUILD=true && pip install lxml

As pointed out on documentation, setting STATICBUILD will tell to lxml's installer to automatically download all its binary dependencies before build.

These lxml binary dependencies, that should be present when installing from source, will be downloaded and build together by the installer:

  • libxslt
  • iconv
  • zlib
  • libxml2

Bonus: It also works inside a virtualenv.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值